Conversation History
Conversation History adapter can be added via its dedicated adapter type.
The adapter supports retrieving the conversation history for a single session. This can be done by filling out the template URL as given below. The session id is passed via the handover call.
GET
to https://api.conversational.cm.com/conversational/conversation-history/v2/accounts/{accountId}/session-history?routerSessionId={sessionId}
This api also supports retrieving session events, you can include events with messages by adding includeEvents
query parameter:
GET
to https://api.conversational.cm.com/conversational/conversation-history/v2/accounts/{accountId}/session-history?routerSessionId={sessionId}&includeEvents=true
You can also only fetch events without messages by adding includeMessages
query parameter:
GET
to https://api.conversational.cm.com/conversational/conversation-history/v2/accounts/{accountId}/session-history?routerSessionId={sessionId}&includeEvents=true&includeMessages=false
Response
Field | Type | Description |
---|---|---|
AccountId | Guid | The CONVERSATIONAL technical link |
SessionId | Guid | Identifier of the session |
ChatId | Guid | A hash created from the combination of client id, host id and channel |
ConversationHistory | array of ConversationMessages | An array of messages/events for that session |
Metadata | Conversation History metadata | Meta data about session history |
Metadata
Field | Type | Description |
---|---|---|
Summary | string | A summarisation of the text messages in the history generated by open ai, only available if includeSummary query parameter is set to true |
Above URL template with the accountId pre-filled can also be retrieved from the frontend.
It is also possible to delete the session history, would that be beneficial to your use case.
DELETE
to https://api.conversational.cm.com/conversational/conversation-history/v1/accounts/{accountId}/session-history/{sessionId}
Both calls need to be authenticated with a product token via the X-Cm-Producttoken
header, described more elaborately in Authentication.
Updated 9 months ago