langchain
langchain copied to clipboard
"Error in on_chain_start callback: 'name'" warning for tutorial "How to add Memory to an LLMChain"
System Info
LangChain version: 0.0.198 Platform: Ubuntu 20.04 LTS Python version: 3.10.4
Who can help?
No response
Information
- [X] The official example notebooks/scripts
- [ ] My own modified scripts
Related Components
- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [X] Chains
- [ ] Callbacks/Tracing
- [ ] Async
Reproduction
- Reproduce tutorial How to add Memory to an LLMChain
- Get the same warning for each invocation of llm_chain.predict():
Error in on_chain_start callback: 'name'
- The same warning will be for the following different configurations (only difference from original code is specified):
3.1.
llm = ChatOpenAI(temperature=0)
3.2chain = ConversationChain( memory=memory, verbose=True, prompt=prompt_template, llm=llm, input_key='human_input' )
3.3memory = ConversationBufferMemory(memory_key='chat_history', return_messages=True)
Expected behavior
There will be no such warnings (or the actions which resolved it must be specified in warning and/or in documentation).
Same problem. Hope not to see any red warning messages either.
I found that the first version that has this warning is the latest one (0.0.198), before that there were no such warnings.
same issue
This occurs only when verbose is set to True
Same problem when use AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION
I use verbose=True
and AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION
simply because it is demoed in the doc and in fact, I don't know what is happening behind.
same issue here as well
Since updating to 0.0.200, I have not had any warnings.
This was an issue with the stdout callback handler that was fixed in v0.0.200
It still occurs with verbose=True
langchain version 0.0.207
add langchain.debug = True
when you want to use verbose=True
. It can temporally solve the problem, that replace the StdOutCallbackHandler to ConsoleCallbackHandler.
I could review a PR fixing StdOutCallbackHandler if that is still broken
How should I update? This seems to be the latest. My pip cannot be updated anymore. Can you provide guidance? thanks
I am trying to run the main.py code given for langchain app in the vocode github but the agent is not working well with outbound number.