A valid request URL is required to generate request examples{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"choices": [
{
"index": 123,
"delta": {
"role": "user",
"tool_call_id": "<string>",
"content": "<string>",
"name": "<string>",
"tool_calls": []
},
"finish_reason": "stop",
"logprobs": {
"content": [
{
"token": "<string>",
"logprob": 123,
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
],
"bytes": [
123
]
}
]
},
"tool_calls": [
{
"function": {
"name": "<string>",
"arguments": "<string>"
},
"type": "function",
"integration": null,
"system": null,
"api_call": null,
"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": false
},
"id": "<string>"
}
]
}
],
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123
},
"jobs": [],
"docs": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Chat
Initiates a chat session.
Routes to different implementations based on feature flags:
- If auto_run_tools_chat feature flag is enabled, uses the new auto-tools implementation
- Otherwise, uses the legacy implementation
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. mock_response (Optional[str]): Mock response for testing. connection_pool: Connection pool for testing purposes.
Returns: ChatResponse or StreamingResponse: The chat response or streaming response.
A valid request URL is required to generate request examples{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"choices": [
{
"index": 123,
"delta": {
"role": "user",
"tool_call_id": "<string>",
"content": "<string>",
"name": "<string>",
"tool_calls": []
},
"finish_reason": "stop",
"logprobs": {
"content": [
{
"token": "<string>",
"logprob": 123,
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
],
"bytes": [
123
]
}
]
},
"tool_calls": [
{
"function": {
"name": "<string>",
"arguments": "<string>"
},
"type": "function",
"integration": null,
"system": null,
"api_call": null,
"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": false
},
"id": "<string>"
}
]
}
],
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123
},
"jobs": [],
"docs": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Headers
Path Parameters
Query Parameters
Body
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
auto, none 120^[\p{L}\p{Nl}\p{Pattern_Syntax}\p{Pattern_White_Space}]+[\p{ID_Start}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\p{Pattern_Syntax}\p{Pattern_White_Space}]*$4-1 <= x <= 1000x >= 1Show child attributes
Show child attributes
- SimpleCompletionResponseFormat
- SchemaCompletionResponseFormat
Show child attributes
Show child attributes
0 <= x <= 20 <= x <= 20 <= x <= 1-2 <= x <= 2-2 <= x <= 20 <= x <= 50 <= x <= 1Response
Successful Response
- ChunkChatResponse
- MessageChatResponse
Show child attributes
Show child attributes
Usage statistics for the completion request
Show child attributes
Show child attributes
Show child attributes
Show child attributes