agents
sessions
users
docs
tasks
executions
temporal
healthz
sessions
Chat
Initiates a chat session.
Parameters: developer (Developer): The developer associated with the chat session. session_id (UUID): The unique identifier of the chat session. chat_input (ChatInput): The chat input data. background_tasks (BackgroundTasks): The background tasks to run. x_custom_api_key (Optional[str]): The custom API key.
Returns: ChatResponse: The chat response.
POST
/
sessions
/
{session_id}
/
chat
{
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123
},
"jobs": [],
"docs": [],
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"choices": [
{
"index": 123,
"finish_reason": "stop",
"logprobs": {
"content": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
],
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
]
}
]
},
"tool_calls": [
{
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
},
"integration": "<any>",
"system": "<any>",
"api_call": "<any>",
"computer_20241022": {
"action": "key",
"text": "<string>",
"coordinate": [
123
]
},
"text_editor_20241022": {
"command": "str_replace",
"path": "<string>",
"file_text": "<string>",
"insert_line": 123,
"new_str": "<string>",
"old_str": "<string>",
"view_range": [
123
]
},
"bash_20241022": {
"command": "<string>",
"restart": true
},
"id": "<string>"
}
],
"delta": {
"role": "user",
"tool_call_id": "<string>",
"content": "<string>",
"name": "<string>",
"continue": true,
"tool_calls": [
{
"type": "<string>",
"function": {
"name": "<string>",
"arguments": "<string>"
},
"integration": "<any>",
"system": "<any>",
"api_call": "<any>",
"computer_20241022": {
"action": "key",
"text": "<string>",
"coordinate": [
123
]
},
"text_editor_20241022": {
"command": "str_replace",
"path": "<string>",
"file_text": "<string>",
"insert_line": 123,
"new_str": "<string>",
"old_str": "<string>",
"view_range": [
123
]
},
"bash_20241022": {
"command": "<string>",
"restart": true
},
"id": "<string>"
}
]
}
}
]
}
Authorizations
Headers
Path Parameters
Query Parameters
Body
application/json
Response
201
application/json
Successful Response
The response is of type object
.
The response is of type object
.
The response is of type object
.
{
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123
},
"jobs": [],
"docs": [],
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"choices": [
{
"index": 123,
"finish_reason": "stop",
"logprobs": {
"content": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
],
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
]
}
]
},
"tool_calls": [
{
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
},
"integration": "<any>",
"system": "<any>",
"api_call": "<any>",
"computer_20241022": {
"action": "key",
"text": "<string>",
"coordinate": [
123
]
},
"text_editor_20241022": {
"command": "str_replace",
"path": "<string>",
"file_text": "<string>",
"insert_line": 123,
"new_str": "<string>",
"old_str": "<string>",
"view_range": [
123
]
},
"bash_20241022": {
"command": "<string>",
"restart": true
},
"id": "<string>"
}
],
"delta": {
"role": "user",
"tool_call_id": "<string>",
"content": "<string>",
"name": "<string>",
"continue": true,
"tool_calls": [
{
"type": "<string>",
"function": {
"name": "<string>",
"arguments": "<string>"
},
"integration": "<any>",
"system": "<any>",
"api_call": "<any>",
"computer_20241022": {
"action": "key",
"text": "<string>",
"coordinate": [
123
]
},
"text_editor_20241022": {
"command": "str_replace",
"path": "<string>",
"file_text": "<string>",
"insert_line": 123,
"new_str": "<string>",
"old_str": "<string>",
"view_range": [
123
]
},
"bash_20241022": {
"command": "<string>",
"restart": true
},
"id": "<string>"
}
]
}
}
]
}