langchain
langchain copied to clipboard
ValueError: Got unsupported early_stopping_method `generate`
Using early_stopping_method with "generate" is not supported with new addition to custom LLM agents. More specifically:
agent_executor = AgentExecutor.from_agent_and_tools(agent=agent, tools=tools, verbose=True, max_execution_time=6, max_iterations=3, early_stopping_method="generate")
Stack trace: Traceback (most recent call last): File "/Users/assafel/Sites/gpt3-text-optimizer/agents/cowriter2.py", line 116, in <module> response = agent_executor.run("Some question") File "/usr/local/lib/python3.9/site-packages/langchain/chains/base.py", line 213, in run return self(args[0])[self.output_keys[0]] File "/usr/local/lib/python3.9/site-packages/langchain/chains/base.py", line 116, in __call__ raise e File "/usr/local/lib/python3.9/site-packages/langchain/chains/base.py", line 113, in __call__ outputs = self._call(inputs) File "/usr/local/lib/python3.9/site-packages/langchain/agents/agent.py", line 855, in _call output = self.agent.return_stopped_response( File "/usr/local/lib/python3.9/site-packages/langchain/agents/agent.py", line 126, in return_stopped_response raise ValueError( ValueError: Got unsupported early_stopping_method
generate``
I also encountered this problem. Looking at the source code, I found that langchain does not currently support this parameter.
Facing the same issue, is it resolved yet?
I have the same promblems , how to solve it ?
?
I have the same issue.
hi there, any news on this one?
Hi, @assafelovic,
I'm helping the LangChain team manage their backlog and am marking this issue as stale. It looks like you opened an issue regarding a ValueError encountered when using the early_stopping_method "generate" with a custom LLM agent. Several users, including alex14dark and ChalamPVS, have reported encountering the same issue and are seeking a resolution.
Could you please confirm if this issue is still relevant to the latest version of the LangChain repository? If it is, please let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you!
Hi, is this issue resolved? I'm running into the issue, please let me know how was this resolved if so, thanks!
the issue still persists with langchain version 0.1.20
2024.7.1 still persist
2024.7.2 still persist
2024.7.15 still persist, langchain 0.2.7