abacusai.deployment_conversation
Classes
A deployment conversation. |
Module Contents
- class abacusai.deployment_conversation.DeploymentConversation(client, deploymentConversationId=None, name=None, deploymentId=None, createdAt=None, lastEventCreatedAt=None, externalSessionId=None, regenerateAttempt=None, externalApplicationId=None, unusedDocumentUploadIds=None, humanizeInstructions=None, conversationWarning=None, conversationType=None, metadata=None, llmDisplayName=None, llmBotIcon=None, searchSuggestions=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.
unusedDocumentUploadIds (list[str]) – The list of unused document upload ids associated with the deployment conversation.
humanizeInstructions (dict) – Instructions for humanizing the conversation.
conversationWarning (str) – Extra text associated with the deployment conversation (to show it at the bottom of chatbot).
conversationType (str) – The type of the conversation, which depicts the application it caters to.
metadata (dict) – Additional backend information about the conversation.
llmDisplayName (str) – The display name of the LLM model used to generate the most recent response. Only used for system-created bots.
llmBotIcon (str) – The icon location of the LLM model used to generate the most recent response. Only used for system-created bots.
searchSuggestions (list) – The list of search suggestions for the conversation.
history (DeploymentConversationEvent) – The history of the deployment conversation.
- deployment_conversation_id
- name
- deployment_id
- created_at
- last_event_created_at
- external_session_id
- regenerate_attempt
- external_application_id
- unused_document_upload_ids
- humanize_instructions
- conversation_warning
- conversation_type
- metadata
- llm_display_name
- llm_bot_icon
- search_suggestions
- history
- deprecated_keys
- __repr__()
- 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, filter_intermediate_conversation_events=True, get_unused_document_uploads=False)
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.
filter_intermediate_conversation_events (bool) – If true, intermediate conversation events will be filtered out. Default is true.
get_unused_document_uploads (bool) – If true, unused document uploads will be returned. Default is false.
- Returns:
The deployment conversation.
- Return type:
- delete(deployment_id=None)
Delete a Deployment Conversation.
- Parameters:
deployment_id (str) – The deployment this conversation belongs to. This is required if not logged in.
- clear(external_session_id=None, deployment_id=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.
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)
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.
- rename(name, deployment_id=None)
Rename a Deployment Conversation.
- 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:
- construct_agent_conversation_messages_for_llm(external_session_id=None, include_document_contents=True)
Returns conversation history in a format for LLM calls.
- Parameters:
- Returns:
Contains a list of AgentConversationMessage that represents the conversation.
- Return type: