abacusai.deployment_conversation

Classes

DeploymentConversationEvent

A single deployment conversation message.

AbstractApiClass

DeploymentConversation

A deployment conversation.

Module Contents

class abacusai.deployment_conversation.DeploymentConversationEvent(client, role=None, text=None, timestamp=None, messageIndex=None, regenerateAttempt=None, modelVersion=None, searchResults=None, isUseful=None, feedback=None, feedbackType=None, docInfos=None, keywordArguments=None, inputParams=None, attachments=None, responseVersion=None, agentWorkflowNodeId=None, nextAgentWorkflowNodeId=None, chatType=None, agentResponse=None, error=None, segments=None, streamedData=None, streamedSectionData=None, highlights=None, llmDisplayName=None, llmBotIcon=None)

Bases: abacusai.return_class.AbstractApiClass

A single deployment conversation message.

Parameters:
  • client (ApiClient) – An authenticated API Client instance

  • role (str) – The role of the message sender

  • text (str) – The text of the message

  • timestamp (str) – The timestamp at which the message was sent

  • messageIndex (int) – The index of the message in the conversation

  • regenerateAttempt (int) – The sequence number of regeneration. Not regenerated if 0.

  • modelVersion (str) – The model instance id associated with the message.

  • searchResults (dict) – The search results for the message.

  • isUseful (bool) – Whether this message was marked as useful or not

  • feedback (str) – The feedback provided for the message

  • feedbackType (str) – The type of feedback provided for the message

  • docInfos (list) – A list of information on the documents associated with the message

  • keywordArguments (dict) – User message only. A dictionary of keyword arguments used to generate response.

  • inputParams (dict) – User message only. A dictionary of input parameters used to generate response.

  • attachments (list) – A list of attachments associated with the message.

  • responseVersion (str) – The version of the response, used to differentiate w/ legacy agent response.

  • agentWorkflowNodeId (str) – The workflow node id associated with the agent response.

  • nextAgentWorkflowNodeId (str) – The id of the workflow node to be executed next.

  • chatType (str) – The type of chat llm that was run for the message.

  • agentResponse (dict) – Response from the agent. Only for conversation with agents.

  • error (str) – The error message in case of an error.

  • segments (list) – The segments of the message.

  • streamedData (str) – Aggregated streamed messages from the agent.

  • streamedSectionData (str) – Aggregated streamed section outputs from the agent in a list.

  • highlights (dict) – Chunks with bounding boxes for highlighting the result sources.

  • llmDisplayName (str) – The display name of the LLM model used to generate the response. Only used for system-created bots.

  • llmBotIcon (str) – The icon location of the LLM model used to generate the response. Only used for system-created bots.

__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:

dict

class abacusai.deployment_conversation.AbstractApiClass(client, id)
__eq__(other)

Return self==value.

_get_attribute_as_dict(attribute)
class abacusai.deployment_conversation.DeploymentConversation(client, deploymentConversationId=None, name=None, deploymentId=None, createdAt=None, lastEventCreatedAt=None, externalSessionId=None, regenerateAttempt=None, externalApplicationId=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.

  • lastEventCreatedAt (str) – The timestamp at which the most recent corresponding deployment conversation event was created at.

  • externalSessionId (str) – The external session id associated with the deployment conversation.

  • regenerateAttempt (int) – The sequence number of regeneration. Not regenerated if 0.

  • externalApplicationId (str) – The external application id associated with the deployment conversation.

  • 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:

dict

get(external_session_id=None, deployment_id=None, deployment_token=None, filter_intermediate_conversation_events=True)

Gets a deployment conversation.

Parameters:
  • external_session_id (str) – External session ID of the 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.

  • filter_intermediate_conversation_events (bool) – If true, intermediate conversation events will be filtered out. Default is true.

Returns:

The deployment conversation.

Return type:

DeploymentConversation

delete(deployment_id=None, deployment_token=None)

Delete a Deployment Conversation.

Parameters:
  • 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.

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, feedback_type=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

  • feedback_type (str) – Optional feedback type

  • 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.

Parameters:
  • name (str) – The new name of the 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.

export(external_session_id=None)

Export a Deployment Conversation.

Parameters:

external_session_id (str) – The external session id associated with the deployment conversation. One of deployment_conversation_id or external_session_id must be provided.

Returns:

The deployment conversation html export.

Return type:

DeploymentConversationExport