Skip to content

Commit 3e11b07

Browse files
pk673Hk669ekzhu
authored
logger fix (#2659)
Co-authored-by: HRUSHIKESH DOKALA <[email protected]> Co-authored-by: Eric Zhu <[email protected]>
1 parent 8b15d44 commit 3e11b07

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

autogen/agentchat/contrib/gpt_assistant_agent.py

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from autogen.agentchat.agent import Agent
1212
from autogen.agentchat.assistant_agent import AssistantAgent, ConversableAgent
1313
from autogen.oai.openai_utils import create_gpt_assistant, retrieve_assistants_by_name, update_gpt_assistant
14+
from autogen.runtime_logging import log_new_agent, logging_enabled
1415

1516
logger = logging.getLogger(__name__)
1617

@@ -65,6 +66,8 @@ def __init__(
6566
super().__init__(
6667
name=name, system_message=instructions, human_input_mode="NEVER", llm_config=openai_client_cfg, **kwargs
6768
)
69+
if logging_enabled():
70+
log_new_agent(self, locals())
6871

6972
# GPTAssistantAgent's azure_deployment param may cause NotFoundError (404) in client.beta.assistants.list()
7073
# See: https://github.com/microsoft/autogen/pull/1721

0 commit comments

Comments
 (0)