the function _get_input_output of chat_memory.py has bug. Its output of response has 2propertity,which is output and messages.But this method using restricted condition len(outputs) != 1.
If I dont use memory,the program run normally.
Help me,thank you!
Error Message and Stack Trace (if applicable)
Traceback (most recent call last):
File "/usr/local/churchill/lib/python3.10/site-packages/langchain/agents/agent_iterator.py", line 195, in __iter__
output = self._process_next_step_output(next_step, run_manager)
File "/usr/local/churchill/lib/python3.10/site-packages/langchain/agents/agent_iterator.py", line 300, in _process_next_step_output
return self._return(next_step_output, run_manager=run_manager)
File "/usr/local/churchill/lib/python3.10/site-packages/langchain/agents/agent_iterator.py", line 379, in _return
return self.make_final_outputs(returned_output, run_manager)
File "/usr/local/churchill/lib/python3.10/site-packages/langchain/agents/agent_iterator.py", line 142, in make_final_outputs
self.agent_executor.prep_outputs(
File "/usr/local/churchill/lib/python3.10/site-packages/langchain/chains/base.py", line 455, in prep_outputs
self.memory.save_context(inputs, outputs)
File "/usr/local/churchill/lib/python3.10/site-packages/langchain/memory/summary.py", line 90, in save_context
super().save_context(inputs, outputs)
File "/usr/local/churchill/lib/python3.10/site-packages/langchain/memory/chat_memory.py", line 38, in save_context
input_str, output_str = self._get_input_output(inputs, outputs)
File "/usr/local/churchill/lib/python3.10/site-packages/langchain/memory/chat_memory.py", line 30, in _get_input_output
raise ValueError(f"One output key expected, got {outputs.keys()}")
ValueError: One output key expected, got dict_keys(['output', 'messages'])
the function _get_input_output of chat_memory.py has bug. Its output of response has 2propertity,which is output and messages.But this method using restricted condition len(outputs) != 1.
If I dont use memory,the program run normally.
Help me,thank you!
Checked other resources
Example Code
the function
_get_input_output
of chat_memory.py has bug. Its output of response has 2propertity,which is output and messages.But this method using restricted conditionlen(outputs) != 1
.If I dont use memory,the program run normally. Help me,thank you!
Error Message and Stack Trace (if applicable)
Description
the function
_get_input_output
of chat_memory.py has bug. Its output of response has 2propertity,which is output and messages.But this method using restricted conditionlen(outputs) != 1
.If I dont use memory,the program run normally. Help me,thank you!
System Info
langchain 0.1.9 linux centos 8 python 3.10