We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94ae126 commit 5d4b6e4Copy full SHA for 5d4b6e4
langchain/agents/conversational/base.py
@@ -75,8 +75,8 @@ def finish_tool_name(self) -> str:
75
return self.ai_prefix
76
77
def _extract_tool_and_input(self, llm_output: str) -> Optional[Tuple[str, str]]:
78
- if f"{self.ai_prefix}: " in llm_output:
79
- return self.ai_prefix, llm_output.split(f"{self.ai_prefix}: ")[-1]
+ if f"{self.ai_prefix}:" in llm_output:
+ return self.ai_prefix, llm_output.split(f"{self.ai_prefix}:")[-1].strip()
80
regex = r"Action: (.*?)\nAction Input: (.*)"
81
match = re.search(regex, llm_output)
82
if not match:
0 commit comments