abacusai.chat_session

Module Contents

Classes

ChatSession

A chat session with Abacus Chat.

class abacusai.chat_session.ChatSession(client, answer=None, availableIndices=None, chatSessionId=None, projectId=None, chatHistory={})

Bases: abacusai.return_class.AbstractApiClass

A chat session with Abacus Chat.

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

  • answer (str) – The response from the chatbot

  • availableIndices (list[dict]) – A list of indices that the chatbot has access to

  • chatSessionId (str) – The chat session id

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

  • chatHistory (ChatMessage) – The chat history for the 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()

Gets a chat session from Abacus Chat.

Parameters:

chat_session_id (str) – The chat session id

Returns:

The chat session with Abacus Chat

Return type:

ChatSession

send_chat_message(message)

Updates chat history with the response from a user message

Parameters:

message (str) – Message you want to send to Abacus Chat

Returns:

The chat session with Abacus Chat

Return type:

ChatSession