mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-17 02:03:44 +00:00
langchain[minor]: fix comment typo (#23564)
**Description:** fix typo of comment **Issue:** N/A **Dependencies:** N/A
This commit is contained in:
parent
47f69fe0d8
commit
daf733b52e
@ -14,12 +14,12 @@ from langchain.agents.output_parsers.tools import ToolAgentAction
|
|||||||
def _create_tool_message(
|
def _create_tool_message(
|
||||||
agent_action: ToolAgentAction, observation: str
|
agent_action: ToolAgentAction, observation: str
|
||||||
) -> ToolMessage:
|
) -> ToolMessage:
|
||||||
"""Convert agent action and observation into a function message.
|
"""Convert agent action and observation into a tool message.
|
||||||
Args:
|
Args:
|
||||||
agent_action: the tool invocation request from the agent
|
agent_action: the tool invocation request from the agent
|
||||||
observation: the result of the tool invocation
|
observation: the result of the tool invocation
|
||||||
Returns:
|
Returns:
|
||||||
FunctionMessage that corresponds to the original tool invocation
|
ToolMessage that corresponds to the original tool invocation
|
||||||
"""
|
"""
|
||||||
if not isinstance(observation, str):
|
if not isinstance(observation, str):
|
||||||
try:
|
try:
|
||||||
@ -38,7 +38,7 @@ def _create_tool_message(
|
|||||||
def format_to_tool_messages(
|
def format_to_tool_messages(
|
||||||
intermediate_steps: Sequence[Tuple[AgentAction, str]],
|
intermediate_steps: Sequence[Tuple[AgentAction, str]],
|
||||||
) -> List[BaseMessage]:
|
) -> List[BaseMessage]:
|
||||||
"""Convert (AgentAction, tool output) tuples into FunctionMessages.
|
"""Convert (AgentAction, tool output) tuples into ToolMessages.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
intermediate_steps: Steps the LLM has taken to date, along with observations
|
intermediate_steps: Steps the LLM has taken to date, along with observations
|
||||||
|
Loading…
Reference in New Issue
Block a user