abacusai.deployment_conversation
Module Contents
Classes
A deployment conversation. |
- class abacusai.deployment_conversation.DeploymentConversation(client, deploymentConversationId=None, name=None, deploymentId=None, createdAt=None, externalSessionId=None, regenerateAttempt=None, history={})
Bases:
abacusai.return_class.AbstractApiClass
A deployment conversation.
- Parameters:
client (ApiClient) – An authenticated API Client instance
deploymentConversationId (str) – The unique identifier of the deployment conversation.
name (str) – The name of the deployment conversation.
deploymentId (str) – The deployment id associated with the deployment conversation.
createdAt (str) – The timestamp at which the deployment conversation was created.
externalSessionId (str) – The external session id associated with the deployment conversation.
regenerateAttempt (int) – The sequence number of regeneration. Not regenerated if 0.
history (DeploymentConversationEvent) – The history of the deployment conversation.
- __repr__()
Return repr(self).
- to_dict()
Get a dict representation of the parameters in this class
- Returns:
The dict value representation of the class parameters
- Return type:
- get(external_session_id=None, deployment_id=None, deployment_token=None)
Gets a deployment conversation.
- Parameters:
- Returns:
The deployment conversation.
- Return type:
- delete(deployment_id=None, deployment_token=None)
Delete a Deployment Conversation.
- clear(external_session_id=None, deployment_id=None, deployment_token=None, user_message_indices=None)
Clear the message history of a Deployment Conversation.
- Parameters:
external_session_id (str) – The external session id associated with the deployment conversation.
deployment_id (str) – The deployment this conversation belongs to. This is required if not logged in.
deployment_token (str) – The deployment token to authenticate access to the deployment. This is required if not logged in.
user_message_indices (list) – Optional list of user message indices to clear. The associated bot response will also be cleared. If not provided, all messages will be cleared.
- set_feedback(message_index, is_useful=None, is_not_useful=None, feedback=None, deployment_id=None, deployment_token=None)
Sets a deployment conversation message as useful or not useful
- Parameters:
message_index (int) – The index of the deployment conversation message
is_useful (bool) – If the message is useful. If true, the message is useful. If false, clear the useful flag.
is_not_useful (bool) – If the message is not useful. If true, the message is not useful. If set to false, clear the useful flag.
feedback (str) – Optional feedback on why the message is useful or not useful
deployment_id (str) – The deployment this conversation belongs to. This is required if not logged in.
deployment_token (str) – The deployment token to authenticate access to the deployment. This is required if not logged in.
- rename(name, deployment_id=None, deployment_token=None)
Rename a Deployment Conversation.