abacusai.chat_session — AbacusAI documentation

# abacusai.chat_session

## Classes

`ChatSession` | A chat session with Abacus Data Science Co-pilot.

## Module Contents

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

  Bases: `abacusai.return_class.AbstractApiClass`

  A chat session with Abacus Data Science Co-pilot.

  Parameters:

    - client (ApiClient) – An authenticated API Client instance

    - answer (str) – The response from the chatbot

    - chatSessionId (str) – The chat session id

    - projectId (str) – The project id associated with the chat session

    - name (str) – The name of the chat session

    - createdAt (str) – The timestamp at which the chat session was created

    - status (str) – The status of the chat sessions

    - aiBuildingInProgress (bool) – Whether the AI building is in progress or not

    - notification (str) – A warn/info message about the chat session. For example, a suggestion to create a new session if the current one is too old

    - whiteboard (str) – A set of whiteboard notes associated with the chat session

    - chatHistory (ChatMessage) – The chat history for the conversation

    - nextAiBuildingTask (AiBuildingTask) – The next AI building task for the chat session

  answer
  chat_session_id
  project_id
  name
  created_at
  status
  ai_building_in_progress
  notification
  whiteboard
  chat_history
  next_ai_building_task
  deprecated_keys
  __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()

    Gets a chat session from Data Science Co-pilot.

    Parameters:

      chat_session_id (str) – Unique ID of the chat session.

    Returns:

      The chat session with Data Science Co-pilot

    Return type:

      ChatSession

  delete_chat_message(message_index)

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

    Parameters:

      message_index (int) – The index of the chat message within the UI.

  export()

    Exports a chat session to an HTML file

    Parameters:

      chat_session_id (str) – Unique ID of the chat session.

  rename(name)

    Renames a chat session with Data Science Co-pilot.

    Parameters:

      name (str) – The new name of the chat session.