Skip to content

On-premise users: click in-app to access the full platform documentation for your version of DataRobot.

Chats (GenAI)

This page outlines the operations, endpoints, parameters, and example requests and responses for the Chats (GenAI).

GET /api/v2/genai/chats/

List chats.

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/genai/chats/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
llmBlueprintId query string false Only retrieve the chats associated with this LLM blueprint ID.
offset query integer false Skip the specified number of values.
limit query integer false Retrieve only the specified number of values.
sort query any false Apply this sort order to the results. Valid options are "name" and "creationDate". Prefix the attribute name with a dash to sort in descending order, e.g., sort=-creationDate.

Example responses

200 Response

{
  "count": 0,
  "data": [
    {
      "creationDate": "2019-08-24T14:15:22Z",
      "creationUserId": "string",
      "id": "string",
      "isFrozen": true,
      "llmBlueprintId": "string",
      "name": "string",
      "promptsCount": 0,
      "warning": "string"
    }
  ],
  "next": "string",
  "previous": "string",
  "totalCount": 0
}

Responses

Status Meaning Description Schema
200 OK Successful Response ListChatsResponse
422 Unprocessable Entity Validation Error HTTPValidationErrorResponse

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

POST /api/v2/genai/chats/

Create a new chat.

Code samples

# You can also use wget
curl -X POST https://app.datarobot.com/api/v2/genai/chats/ \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
  -d '{CreateChatRequest}'

Body parameter

{
  "llmBlueprintId": "string",
  "name": "string"
}

Parameters

Name In Type Required Description
body body CreateChatRequest true none

Example responses

201 Response

{
  "creationDate": "2019-08-24T14:15:22Z",
  "creationUserId": "string",
  "id": "string",
  "isFrozen": true,
  "llmBlueprintId": "string",
  "name": "string",
  "promptsCount": 0,
  "warning": "string"
}

Responses

Status Meaning Description Schema
201 Created Successful Response ChatResponse
422 Unprocessable Entity Validation Error HTTPValidationErrorResponse

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

DELETE /api/v2/genai/chats/{chatId}/

Delete an existing chat.

Code samples

# You can also use wget
curl -X DELETE https://app.datarobot.com/api/v2/genai/chats/{chatId}/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
chatId path string true The ID of the chat to delete.

Example responses

422 Response

{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content Successful Response None
422 Unprocessable Entity Validation Error HTTPValidationErrorResponse

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/genai/chats/{chatId}/

Retrieve an existing chat.

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/genai/chats/{chatId}/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
chatId path string true The ID of the chat to retrieve.

Example responses

200 Response

{
  "creationDate": "2019-08-24T14:15:22Z",
  "creationUserId": "string",
  "id": "string",
  "isFrozen": true,
  "llmBlueprintId": "string",
  "name": "string",
  "promptsCount": 0,
  "warning": "string"
}

Responses

Status Meaning Description Schema
200 OK Successful Response ChatResponse
422 Unprocessable Entity Validation Error HTTPValidationErrorResponse

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

PATCH /api/v2/genai/chats/{chatId}/

Edit an existing chat.

Code samples

# You can also use wget
curl -X PATCH https://app.datarobot.com/api/v2/genai/chats/{chatId}/ \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
  -d '{undefined}'

Body parameter

{
  "name": "string"
}

Parameters

Name In Type Required Description
chatId path string true The ID of the chat to edit.
body body EditChatRequest true none

Example responses

200 Response

{
  "creationDate": "2019-08-24T14:15:22Z",
  "creationUserId": "string",
  "id": "string",
  "isFrozen": true,
  "llmBlueprintId": "string",
  "name": "string",
  "promptsCount": 0,
  "warning": "string"
}

Responses

Status Meaning Description Schema
200 OK Successful Response ChatResponse
422 Unprocessable Entity Validation Error HTTPValidationErrorResponse

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

Schemas

ChatResponse

{
  "creationDate": "2019-08-24T14:15:22Z",
  "creationUserId": "string",
  "id": "string",
  "isFrozen": true,
  "llmBlueprintId": "string",
  "name": "string",
  "promptsCount": 0,
  "warning": "string"
}

ChatResponse

Properties

Name Type Required Restrictions Description
creationDate string(date-time) true The creation date of the chat (ISO 8601 formatted).
creationUserId string true The ID of the user that created the chat.
id string true The ID of the chat.
isFrozen boolean true Whether the chat is frozen (e.g., an evaluation chat). If the chat is frozen, it does not accept new prompts.
llmBlueprintId string true The ID of the LLM blueprint associated with the chat.
name string true The name of the chat.
promptsCount integer true The number of chat prompts in the chat.
warning string¦null true Warning about the contents of the chat.

ChatsSortQueryParam

"name"

ChatsSortQueryParam

Properties

Name Type Required Restrictions Description
ChatsSortQueryParam string false Sort order values for listing chats.

Enumerated Values

Property Value
ChatsSortQueryParam [name, -name, creationDate, -creationDate]

CreateChatRequest

{
  "llmBlueprintId": "string",
  "name": "string"
}

CreateChatRequest

Properties

Name Type Required Restrictions Description
llmBlueprintId string true The ID of the LLM blueprint to associate with the chat.
name string true maxLength: 5000
minLength: 1
minLength: 1
The name of the chat.

EditChatRequest

{
  "name": "string"
}

EditChatRequest

Properties

Name Type Required Restrictions Description
name string true maxLength: 5000
minLength: 1
minLength: 1
The new name of the chat.

HTTPValidationErrorResponse

{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

HTTPValidationErrorResponse

Properties

Name Type Required Restrictions Description
detail [ValidationError] false none

ListChatsResponse

{
  "count": 0,
  "data": [
    {
      "creationDate": "2019-08-24T14:15:22Z",
      "creationUserId": "string",
      "id": "string",
      "isFrozen": true,
      "llmBlueprintId": "string",
      "name": "string",
      "promptsCount": 0,
      "warning": "string"
    }
  ],
  "next": "string",
  "previous": "string",
  "totalCount": 0
}

ListChatsResponse

Properties

Name Type Required Restrictions Description
count integer true The number of records on this page.
data [ChatResponse] true The list of records.
next string¦null true The URL to the next page, or null if there is no such page.
previous string¦null true The URL to the previous page, or null if there is no such page.
totalCount integer true The total number of records.

ValidationError

{
  "loc": [
    "string"
  ],
  "msg": "string",
  "type": "string"
}

ValidationError

Properties

Name Type Required Restrictions Description
loc [anyOf] true none

anyOf

Name Type Required Restrictions Description
» anonymous string false none

or

Name Type Required Restrictions Description
» anonymous integer false none

continued

Name Type Required Restrictions Description
msg string true none
type string true none

Updated November 26, 2024