mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-19 19:11:33 +00:00
Fix handling of missing action & input for async MRKL agent (#5985)
Hi, This is a fix for https://github.com/hwchase17/langchain/pull/5014. This PR forgot to add the ability to self solve the ValueError(f"Could not parse LLM output: {llm_output}") error for `_atake_next_step`.
This commit is contained in:
parent
ca1afa7213
commit
0ca37e613c
@ -864,7 +864,11 @@ class AgentExecutor(Chain):
|
|||||||
raise e
|
raise e
|
||||||
text = str(e)
|
text = str(e)
|
||||||
if isinstance(self.handle_parsing_errors, bool):
|
if isinstance(self.handle_parsing_errors, bool):
|
||||||
observation = "Invalid or incomplete response"
|
if e.send_to_llm:
|
||||||
|
observation = str(e.observation)
|
||||||
|
text = str(e.llm_output)
|
||||||
|
else:
|
||||||
|
observation = "Invalid or incomplete response"
|
||||||
elif isinstance(self.handle_parsing_errors, str):
|
elif isinstance(self.handle_parsing_errors, str):
|
||||||
observation = self.handle_parsing_errors
|
observation = self.handle_parsing_errors
|
||||||
elif callable(self.handle_parsing_errors):
|
elif callable(self.handle_parsing_errors):
|
||||||
|
Loading…
Reference in New Issue
Block a user