ChatContext

ChatContext(agent: ConversableAgent)

ChatContext class that extends BaseContext.

This class is used to represent a chat context that holds a list of messages. It inherits from BaseContext and adds the messages attribute.

Initializes the ChatContext with an agent.

Parameters:
NameDescription
agentThe agent to use for retrieving chat messages.

Type: ConversableAgent

Instance Attributes

chat_messages


The messages in the chat.

Returns: A dictionary of agents and their messages.

last_message


The last message in the chat.

Returns: The last message in the chat.