🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
fix: use print instead of customized logger for human tool (#1258)
Wendong-Fan8d71db77a1e4
diff --git a/camel/toolkits/human_toolkit.py b/camel/toolkits/human_toolkit.pyindex 6f25626a7..42746961c 100644--- a/camel/toolkits/human_toolkit.py+++ b/camel/toolkits/human_toolkit.py@@ -18,18 +18,6 @@ from typing import Listfrom camel.toolkits.base import BaseToolkitfrom camel.toolkits.function_tool import FunctionTool-# Add a new logging level called NOTICE, which is the same as WARNING-# Used for logging questions, and it will be shown in the console-NOTICE_LEVEL = 30 # same as WARNING-logging.addLevelName(NOTICE_LEVEL, "NOTICE")---def notice(self, message, *args, **kwargs):- if self.isEnabledFor(NOTICE_LEVEL):- self._log(NOTICE_LEVEL, message, args, **kwargs)---logging.Logger.notice = notice # type: ignore[attr-defined]logger = logging.getLogger(__name__)@@ -48,7 +36,8 @@ class HumanToolkit(BaseToolkit):Returns:str: The answer from the human."""- logger.notice(f"Question: {question}") # type: ignore[attr-defined]+ print(f"Question: {question}")+ logger.info(f"Question: {question}")reply = input("Your reply: ")logger.info(f"User reply: {reply}")return reply