Swap sequence
This commit is contained in:
parent
8b4ec1915b
commit
f66d23ad25
2 changed files with 5 additions and 5 deletions
|
@ -100,10 +100,10 @@ class AkariParser(AgentOutputParser):
|
|||
def parse(self, llm_output: str) -> Union[AgentAction, AgentFinish]:
|
||||
regex = r"Action: (.*?)\[(.*)\]"
|
||||
match = re.search(regex, llm_output, re.DOTALL)
|
||||
action = match.group(1).strip()
|
||||
action_input = match.group(2)
|
||||
if not match:
|
||||
raise ValueError(f"Could not parse LLM output: `{llm_output}`")
|
||||
action = match.group(1).strip()
|
||||
action_input = match.group(2)
|
||||
if action == "Answer":
|
||||
return AgentFinish(
|
||||
return_values = {"output": action_input.strip()},
|
||||
|
|
|
@ -695,9 +695,9 @@ kiwisolver==1.4.4 ; python_full_version >= "3.8.1" and python_full_version < "4.
|
|||
--hash=sha256:f6cb459eea32a4e2cf18ba5fcece2dbdf496384413bc1bae15583f19e567f3b2 \
|
||||
--hash=sha256:f8ad8285b01b0d4695102546b342b493b3ccc6781fc28c8c6a1bb63e95d22f09 \
|
||||
--hash=sha256:f9f39e2f049db33a908319cf46624a569b36983c7c78318e9726a4cb8923b26c
|
||||
langchain==0.0.127 ; python_full_version >= "3.8.1" and python_version < "4.0" \
|
||||
--hash=sha256:04ba053881e6098e80e0f4afc8922f3fe78923b160fd12d856aebce49c261918 \
|
||||
--hash=sha256:e8a3b67fd86a6f79c4334f0a7588c9476fcb57b27a8fb0e617f47c01eaab8be8
|
||||
langchain==0.0.131 ; python_full_version >= "3.8.1" and python_version < "4.0" \
|
||||
--hash=sha256:3564a759e85095c9d71a78817da9cec1e2a8a0cda1bdd94ef8ac7008e432717a \
|
||||
--hash=sha256:61baf67fbec561ce38d187915a46e1c41139270826453600951760fde1a5d98a
|
||||
loguru==0.6.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" \
|
||||
--hash=sha256:066bd06758d0a513e9836fd9c6b5a75bfb3fd36841f4b996bc60b547a309d41c \
|
||||
--hash=sha256:4e2414d534a2ab57573365b3e6d0234dfb1d84b68b7f3b948e6fb743860a77c3
|
||||
|
|
Reference in a new issue