abacusai.chat_session
=====================

.. py:module:: abacusai.chat_session


Classes
-------

.. autoapisummary::

   abacusai.chat_session.AiBuildingTask
   abacusai.chat_session.ChatMessage
   abacusai.chat_session.AbstractApiClass
   abacusai.chat_session.ChatSession


Module Contents
---------------

.. py:class:: AiBuildingTask(client, task=None, taskType=None)

   Bases: :py:obj:`abacusai.return_class.AbstractApiClass`


   A task for Data Science Co-pilot to help build AI.

   :param client: An authenticated API Client instance
   :type client: ApiClient
   :param task: The task to be performed
   :type task: str
   :param taskType: The type of task
   :type taskType: str


   .. py:method:: __repr__()

      Return repr(self).



   .. 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:class:: ChatMessage(client, role=None, text=None, timestamp=None, isUseful=None, feedback=None, docIds=None, hotkeyTitle=None, tasks=None)

   Bases: :py:obj:`abacusai.return_class.AbstractApiClass`


   A single chat message with Abacus Chat.

   :param client: An authenticated API Client instance
   :type client: ApiClient
   :param role: The role of the message sender
   :type role: str
   :param text: A list of text segments for the message
   :type text: list[dict]
   :param timestamp: The timestamp at which the message was sent
   :type timestamp: str
   :param isUseful: Whether this message was marked as useful or not
   :type isUseful: bool
   :param feedback: The feedback provided for the message
   :type feedback: str
   :param docIds: A list of IDs of the uploaded document if the message has
   :type docIds: list[str]
   :param hotkeyTitle: The title of the hotkey prompt if the message has one
   :type hotkeyTitle: str
   :param tasks: The list of spawned tasks, if the message was broken down into smaller sub-tasks.
   :type tasks: list[str]


   .. py:method:: __repr__()

      Return repr(self).



   .. 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:class:: AbstractApiClass(client, id)

   .. py:method:: __eq__(other)

      Return self==value.



   .. py:method:: _get_attribute_as_dict(attribute)


.. py:class:: ChatSession(client, answer=None, chatSessionId=None, projectId=None, name=None, createdAt=None, status=None, aiBuildingInProgress=None, notification=None, whiteboard=None, chatHistory={}, nextAiBuildingTask={})

   Bases: :py:obj:`abacusai.return_class.AbstractApiClass`


   A chat session with Abacus Data Science Co-pilot.

   :param client: An authenticated API Client instance
   :type client: ApiClient
   :param answer: The response from the chatbot
   :type answer: str
   :param chatSessionId: The chat session id
   :type chatSessionId: str
   :param projectId: The project id associated with the chat session
   :type projectId: str
   :param name: The name of the chat session
   :type name: str
   :param createdAt: The timestamp at which the chat session was created
   :type createdAt: str
   :param status: The status of the chat sessions
   :type status: str
   :param aiBuildingInProgress: Whether the AI building is in progress or not
   :type aiBuildingInProgress: bool
   :param notification: A warn/info message about the chat session. For example, a suggestion to create a new session if the current one is too old
   :type notification: str
   :param whiteboard: A set of whiteboard notes associated with the chat session
   :type whiteboard: str
   :param chatHistory: The chat history for the conversation
   :type chatHistory: ChatMessage
   :param nextAiBuildingTask: The next AI building task for the chat session
   :type nextAiBuildingTask: AiBuildingTask


   .. py:method:: __repr__()

      Return repr(self).



   .. 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()

      Gets a chat session from Data Science Co-pilot.

      :param chat_session_id: Unique ID of the chat session.
      :type chat_session_id: str

      :returns: The chat session with Data Science Co-pilot
      :rtype: ChatSession



   .. py:method:: delete_chat_message(message_index)

      Deletes a message in a chat session and its associated response.

      :param message_index: The index of the chat message within the UI.
      :type message_index: int



   .. py:method:: export()

      Exports a chat session to an HTML file

      :param chat_session_id: Unique ID of the chat session.
      :type chat_session_id: str



   .. py:method:: rename(name)

      Renames a chat session with Data Science Co-pilot.

      :param name: The new name of the chat session.
      :type name: str



