class ChatBot

source code

Agent class represents an LLM chat agent.

properties


client

source code

def client(self) -> _Client:

Get the client object.

Returns:

The client.

setters


set_client

source code

def set_client(self, value: client) -> None:

Set the client.

Arguments:

  • value - The unify client.

methods


clear_chat_history

source code

def clear_chat_history(self) -> None:

Clears the chat history.


run

source code

def run(self, show_credits: bool = False, show_endpoint: bool = False) -> None:

Starts the chat interaction loop.

Arguments:

  • show_credits - Whether to show credit consumption. Defaults to False.
  • show_endpoint - Whether to show the endpoint used. Defaults to False.

dunder_methods


__init__

source code

def __init__(
        self,
        client: _Client,
    ) -> None:

Initializes the ChatBot object, wrapped around a client.

Arguments:

  • client - The Client instance to wrap the chatbot logic around.