Archived
1
0
Fork 0

Strip whitespaces and quotes from the string

This commit is contained in:
Dianliang233 2023-04-05 16:29:18 +08:00
parent f66d23ad25
commit 98f6089ca2

View file

@ -106,7 +106,7 @@ class AkariParser(AgentOutputParser):
action_input = match.group(2) action_input = match.group(2)
if action == "Answer": if action == "Answer":
return AgentFinish( return AgentFinish(
return_values = {"output": action_input.strip()}, return_values = {"output": action_input.strip(" ").strip('"')},
log = llm_output, log = llm_output,
) )
return AgentAction(tool=action, tool_input=action_input.strip(" ").strip('"'), log=llm_output) return AgentAction(tool=action, tool_input=action_input.strip(" ").strip('"'), log=llm_output)