Skip to main content

BaseLogger

Helper class that provides a standard way to create an ABC using inheritance.

Instance Methods

get_connection

Return a connection to the logging database.

log_chat_completion

Log a chat completion to database.
In AG2, chat completions are somewhat complicated because they are handled by the autogen.oai.OpenAIWrapper class.
One invocation to create can lead to multiple underlying OpenAI calls, depending on the llm_config list used, and any errors or retries.
Parameters:

log_event

Log an event for an agent.
Parameters:

log_function_use

Log the use of a registered function (could be a tool) Parameters:

log_new_agent

Log the birth of a new agent.
Parameters:

log_new_client

Log the birth of a new OpenAIWrapper.
Parameters:

log_new_wrapper

Log the birth of a new OpenAIWrapper.
Parameters:

start

Open a connection to the logging database, and start recording.
Returns:
session_id (str): a unique id for the logging session
Returns:

stop

Close the connection to the logging database, and stop logging.