forked from Archives/langchain
Merge branch 'ankush/callbackhandler' into harrison/callback-updates
This commit is contained in:
commit
3086b752a3
@ -73,7 +73,7 @@ class Agent(BaseModel):
|
|||||||
parsed_output = self._extract_tool_and_input(full_output)
|
parsed_output = self._extract_tool_and_input(full_output)
|
||||||
tool, tool_input = parsed_output
|
tool, tool_input = parsed_output
|
||||||
if tool == self.finish_tool_name:
|
if tool == self.finish_tool_name:
|
||||||
return AgentFinish(full_output, {"output": tool_input})
|
return AgentFinish({"output": tool_input}, full_output)
|
||||||
return AgentAction(tool, tool_input, full_output)
|
return AgentAction(tool, tool_input, full_output)
|
||||||
|
|
||||||
def prepare_for_new_call(self) -> None:
|
def prepare_for_new_call(self) -> None:
|
||||||
|
@ -14,8 +14,8 @@ class AgentAction(NamedTuple):
|
|||||||
class AgentFinish(NamedTuple):
|
class AgentFinish(NamedTuple):
|
||||||
"""Agent's return value."""
|
"""Agent's return value."""
|
||||||
|
|
||||||
log: str
|
|
||||||
return_values: dict
|
return_values: dict
|
||||||
|
log: str
|
||||||
|
|
||||||
|
|
||||||
class Generation(NamedTuple):
|
class Generation(NamedTuple):
|
||||||
|
Loading…
Reference in New Issue
Block a user