[deprecated] Upsert Conversation
Last updated
Was this helpful?
Last updated
Was this helpful?
Upserting a conversation is a way to continuously send a transcript of an LLM interaction to Context.ai, without needing to keep track of when the transcript ends. You can instead repeatedly send an updated conversation object as each new message arrives.
The semantics of upserting are this: If a conversation request is received that does not match a prior conversation, a new conversation is created. If the conversation request partially matches a prior conversation uploaded to Context.ai, then the prior conversation is amended with the new messages.
To use upserting, you must:
Always send conversation log requests with an increasing number of messages, always including the full conversation history in each request. Do not send log requests out of order.
Always include the same metadata on each conversation log request.
Always include at least 2 messages in the first upsert request. A conversation will only be considered a 'match' if new requests are prefixed with at least 2 messages from prior insertions/upsertions.
POST
https://api.context.ai/api/v1/log/conversation/upsert
Records a conversation in Context.
conversation*
Object
A object.