diff --git a/autogen/logger/file_logger.py b/autogen/logger/file_logger.py index 37bbbd25a523..07c9c3b76a76 100644 --- a/autogen/logger/file_logger.py +++ b/autogen/logger/file_logger.py @@ -90,7 +90,7 @@ def log_chat_completion( thread_id = threading.get_ident() source_name = None if isinstance(source, str): - source_name = source + source_name = getattr(source, "name", "unknown") else: source_name = source.name try: