v1

latestOpenAPI 3.1.0raw.githubusercontent.com2024-11-01441490.1 KB
Chat

Create New Chat Thread With Message

Create a new chat with the specified brain and message.

post/chat/new-chat

Request body

brain_idstring required

The ID of the brain to associate with the chat

namestring required

The name of the chat

messagestring required

The initial message to start the chat

response_length'SHORT' | 'MEDIUM' | 'LONG' nullable

Configure response length

temperaturenumber nullable

between 0 and 1

system_messagestring nullable

System message for the LLM

modelstring nullable

LLM Model to choose from

chat_message_type'JSON' | 'TEXT'

Example request

{
  "brain_ids": [
    "2ad136c5-d2a2-4bbc-bc3d-974f9f88e86d"
  ],
  "name": "Slack Chat - 2024-06-26T12:34:56.789Z",
  "message": "Hello, how can I assist you today?"
}

Response

actorstring

The actor (USER or AI) of the interaction

created_atstring

The timestamp when the interaction was created

dw_dataobject nullable

The data related to the data warehouse integration

idinteger

The unique identifier of the interaction

messagestring

The message content of the interaction

metadataobject nullable

The metadata associated with the interaction

modelstring nullable

The name of the model used for the interaction

thread_idstring

The ID of the chat thread associated with the interaction

timestampstring

The timestamp when the interaction occurred

user_creditsinteger nullable

The number of credits used by the user for the interaction