abacusai.deployment_conversation ================================ .. py:module:: abacusai.deployment_conversation Classes ------- .. autoapisummary:: abacusai.deployment_conversation.DeploymentConversation Module Contents --------------- .. py:class:: DeploymentConversation(client, deploymentConversationId=None, name=None, deploymentId=None, createdAt=None, lastEventCreatedAt=None, hasHistory=None, externalSessionId=None, regenerateAttempt=None, externalApplicationId=None, unusedDocumentUploadIds=None, humanizeInstructions=None, conversationWarning=None, conversationType=None, metadata=None, llmDisplayName=None, llmBotIcon=None, searchSuggestions=None, chatllmTaskId=None, history={}) Bases: :py:obj:`abacusai.return_class.AbstractApiClass` A deployment conversation. :param client: An authenticated API Client instance :type client: ApiClient :param deploymentConversationId: The unique identifier of the deployment conversation. :type deploymentConversationId: str :param name: The name of the deployment conversation. :type name: str :param deploymentId: The deployment id associated with the deployment conversation. :type deploymentId: str :param createdAt: The timestamp at which the deployment conversation was created. :type createdAt: str :param lastEventCreatedAt: The timestamp at which the most recent corresponding deployment conversation event was created at. :type lastEventCreatedAt: str :param hasHistory: Whether the deployment conversation has any history. :type hasHistory: bool :param externalSessionId: The external session id associated with the deployment conversation. :type externalSessionId: str :param regenerateAttempt: The sequence number of regeneration. Not regenerated if 0. :type regenerateAttempt: int :param externalApplicationId: The external application id associated with the deployment conversation. :type externalApplicationId: str :param unusedDocumentUploadIds: The list of unused document upload ids associated with the deployment conversation. :type unusedDocumentUploadIds: list[str] :param humanizeInstructions: Instructions for humanizing the conversation. :type humanizeInstructions: dict :param conversationWarning: Extra text associated with the deployment conversation (to show it at the bottom of chatbot). :type conversationWarning: str :param conversationType: The type of the conversation, which depicts the application it caters to. :type conversationType: str :param metadata: Additional backend information about the conversation. :type metadata: dict :param llmDisplayName: The display name of the LLM model used to generate the most recent response. Only used for system-created bots. :type llmDisplayName: str :param llmBotIcon: The icon location of the LLM model used to generate the most recent response. Only used for system-created bots. :type llmBotIcon: str :param searchSuggestions: The list of search suggestions for the conversation. :type searchSuggestions: list :param chatllmTaskId: The chatllm task id associated with the deployment conversation. :type chatllmTaskId: str :param history: The history of the deployment conversation. :type history: DeploymentConversationEvent .. py:attribute:: deployment_conversation_id :value: None .. py:attribute:: name :value: None .. py:attribute:: deployment_id :value: None .. py:attribute:: created_at :value: None .. py:attribute:: last_event_created_at :value: None .. py:attribute:: has_history :value: None .. py:attribute:: external_session_id :value: None .. py:attribute:: regenerate_attempt :value: None .. py:attribute:: external_application_id :value: None .. py:attribute:: unused_document_upload_ids :value: None .. py:attribute:: humanize_instructions :value: None .. py:attribute:: conversation_warning :value: None .. py:attribute:: conversation_type :value: None .. py:attribute:: metadata :value: None .. py:attribute:: llm_display_name :value: None .. py:attribute:: llm_bot_icon :value: None .. py:attribute:: search_suggestions :value: None .. py:attribute:: chatllm_task_id :value: None .. py:attribute:: history .. py:attribute:: deprecated_keys .. py:method:: __repr__() .. py:method:: to_dict() Get a dict representation of the parameters in this class :returns: The dict value representation of the class parameters :rtype: dict .. py:method:: get(external_session_id = None, deployment_id = None, filter_intermediate_conversation_events = True, get_unused_document_uploads = False) Gets a deployment conversation. :param external_session_id: External session ID of the conversation. :type external_session_id: str :param deployment_id: The deployment this conversation belongs to. This is required if not logged in. :type deployment_id: str :param filter_intermediate_conversation_events: If true, intermediate conversation events will be filtered out. Default is true. :type filter_intermediate_conversation_events: bool :param get_unused_document_uploads: If true, unused document uploads will be returned. Default is false. :type get_unused_document_uploads: bool :returns: The deployment conversation. :rtype: DeploymentConversation .. py:method:: delete(deployment_id = None) Delete a Deployment Conversation. :param deployment_id: The deployment this conversation belongs to. This is required if not logged in. :type deployment_id: str .. py:method:: clear(external_session_id = None, deployment_id = None, user_message_indices = None) Clear the message history of a Deployment Conversation. :param external_session_id: The external session id associated with the deployment conversation. :type external_session_id: str :param deployment_id: The deployment this conversation belongs to. This is required if not logged in. :type deployment_id: str :param user_message_indices: Optional list of user message indices to clear. The associated bot response will also be cleared. If not provided, all messages will be cleared. :type user_message_indices: list .. py:method:: 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 :param message_index: The index of the deployment conversation message :type message_index: int :param is_useful: If the message is useful. If true, the message is useful. If false, clear the useful flag. :type is_useful: bool :param is_not_useful: If the message is not useful. If true, the message is not useful. If set to false, clear the useful flag. :type is_not_useful: bool :param feedback: Optional feedback on why the message is useful or not useful :type feedback: str :param feedback_type: Optional feedback type :type feedback_type: str :param deployment_id: The deployment this conversation belongs to. This is required if not logged in. :type deployment_id: str .. py:method:: rename(name, deployment_id = None) Rename a Deployment Conversation. :param name: The new name of the conversation. :type name: str :param deployment_id: The deployment this conversation belongs to. This is required if not logged in. :type deployment_id: str .. py:method:: export(external_session_id = None) Export a Deployment Conversation. :param external_session_id: The external session id associated with the deployment conversation. One of deployment_conversation_id or external_session_id must be provided. :type external_session_id: str :returns: The deployment conversation html export. :rtype: DeploymentConversationExport .. py:method:: construct_agent_conversation_messages_for_llm(external_session_id = None, include_document_contents = True) Returns conversation history in a format for LLM calls. :param external_session_id: External session ID of the conversation. :type external_session_id: str :param include_document_contents: If true, include contents from uploaded documents in the generated messages. :type include_document_contents: bool :returns: Contains a list of AgentConversationMessage that represents the conversation. :rtype: AgentConversation