Skip to content

[Bug]: Error when using logging: [file_logger] Failed to log event Object of type OpenAIWrapper is not JSON serializable #3249

Closed
@tyler-suard-parker

Description

@tyler-suard-parker

Describe the bug

I am using this tutorial: https://microsoft.github.io/autogen/docs/notebooks/agentchat_logging/ for the syntax of logging, but it is not working for me. I get the above error.

Steps to reproduce

logging_session_id = autogen.runtime_logging.start(
    logger_type="file", config={"filename": "autogen_log.log"}
)

(run some agents)

Model Used

gpt-4

Expected Behavior

The log should have generated token usage

Screenshots and logs

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.2Issues which are related to the pre 0.4 codebaseneeds-triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions