sessions
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.

post/sessions/{session_id}/chat

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/sessions/{session_id}/chat
  • Auth
    API key in header Authorization

Path parameters

session_idstring uuid required

Query parameters

connection_poolunknown

Headers

X-Custom-Api-Keystring nullable

Request body

rememberboolean
recallboolean
saveboolean
modelstring nullable
streamboolean
stopstring[]
seedinteger nullable
max_tokensinteger nullable
logit_biasobject nullable
agentstring uuid nullable
repetition_penaltynumber nullable
length_penaltynumber nullable
min_pnumber nullable
frequency_penaltynumber nullable
presence_penaltynumber nullable
temperaturenumber nullable
top_pnumber nullable
metadataobject nullable
auto_run_toolsboolean
recall_toolsboolean

Response

Successful Response

OR

Changes

    • warning

      removed the request property //

    • warning

      removed the optional property //// from the response with the status

    • info

      added the new optional request property

    • info

      added the new optional request property