autogen icon indicating copy to clipboard operation
autogen copied to clipboard

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

Open tyler-suard-parker opened this issue 1 year ago • 2 comments

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

tyler-suard-parker avatar Jul 29 '24 23:07 tyler-suard-parker

Additionally, the logger is not showing the token usage.

tyler-suard-parker avatar Jul 30 '24 00:07 tyler-suard-parker

@tyler-suard-parker my code works well without error. Can you provide the entire example codes for reproduce it?

Zizo-Vi avatar Jul 30 '24 00:07 Zizo-Vi

Closing as stale

victordibia avatar Jun 14 '25 03:06 victordibia