Thread Conversation
Unlike Upsert Conversation, with thread conversation, you do not need to send us the entire transcript each time that you have new messages in your LLM conversations. As the conversation progresses, you only need to send us the new messages alongside the thread conversation identifier and we will append these messages to the corresponding conversation transcript in Context.ai.
The semantics of thread conversation are: If a conversation request is received without the id
property, a new thread conversation is created and the corresponding identifier is returned. For all subsequent appends to this thread conversation, the user is expected to send this identifier in the request. If a conversation request has the id
property, the messages are appended to the conversation matching that id
.
To use thread conversation, you must:
Always use the same id when appending messages to an existing thread conversation.
Always include the same metadata on each thread conversation log request.
Log a thread conversation
POST
https://api.context.ai/api/v1/log/conversation/thread
Records a thread conversation in Context.ai.
Request Body
thread*
Object
A Thread object.
Example Request
Example Response
Last updated