Logger INFO not show when function call from langchain agent executor. #23862
Replies: 1 comment 4 replies
-
from langchain.globals import set_debug
set_debug(True)
agent_executor = AgentExecutor(agent=agent, tools=tools)
agent_executor.invoke(
{"input": "Who directed the 2023 film Oppenheimer and what is their age in days?"}
) This will cause all LangChain components with callback support to print the inputs they receive and outputs they generate, ensuring that import logging
logging.basicConfig(level=logging.INFO) This ensures that |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
When I try to control the robot dog (
go2
) using WebRTC, each timeconn.data_channel.send
is called,logger.info
logs "received message
" viaon_message
if I don't use the agent. However, when I introduce the agent concept, theagent_executor
(astream_event
) calling the function triggersconn.data_channel.send
, and the logger does not display any messages.Here is the original code of
Go2Connection
: Go2Connection original code.System Info
System Information
Package Information
Packages not installed (Not Necessarily a Problem)
The following packages were not found:
Beta Was this translation helpful? Give feedback.
All reactions