logger
autogen.logger.FileLogger
FileLogger
Helper class that provides a standard way to create an ABC using inheritance.
Parameters:Name | Description |
---|---|
config | Type: dict[str, Any] |
Instance Methods
get_connection
Method is intentionally left blank because there is no specific connection needed for the FileLogger.
log_chat_completion
Log a chat completion.
Parameters:Name | Description |
---|---|
invocation_id | Type: uuid.UUID |
client_id | Type: int |
wrapper_id | Type: int |
source | Type: str | Agent |
request | Type: dict[str, float | str | list[dict[str, str]]] |
response | Type: str | ChatCompletion |
is_cached | Type: int |
cost | Type: float |
start_time | Type: str |
log_event
Log an event from an agent or a string source.
Parameters:Name | Description |
---|---|
source | Type: str | Agent |
name | Type: str |
**kwargs | Type: dict[str, Any] |
log_function_use
Log a registered function(can be a tool) use from an agent or a string source.
Parameters:Name | Description |
---|---|
source | Type: str | Agent |
function | Type: F |
args | Type: dict[str, Any] |
returns | Type: Any |
log_new_agent
Log a new agent instance.
Parameters:Name | Description |
---|---|
agent | Type: ConversableAgent |
init_args | Type: dict[str, Any] Default: {} |
log_new_client
Log a new client instance.
Parameters:Name | Description |
---|---|
client | Type: AzureOpenAI | OpenAI | CerebrasClient | GeminiClient | AnthropicClient | MistralAIClient | TogetherClient | GroqClient | CohereClient | OllamaClient | BedrockClient |
wrapper | Type: OpenAIWrapper |
init_args | Type: dict[str, Any] |
log_new_wrapper
Log a new wrapper instance.
Parameters:Name | Description |
---|---|
wrapper | Type: OpenAIWrapper |
init_args | Type: dict[str, LLMConfig | list[LLMConfig]] Default: {} |
start
Start the logger and return the session_id.
stop
Close the file handler and remove it from the logger.