langchain.agents.format_scratchpad.log_to_messages
.format_log_to_messagesΒΆ
- langchain.agents.format_scratchpad.log_to_messages.format_log_to_messages(intermediate_steps: List[Tuple[AgentAction, str]], template_tool_response: str = '{observation}') List[BaseMessage] [source]ΒΆ
Construct the scratchpad that lets the agent continue its thought process.
- Parameters
intermediate_steps (List[Tuple[AgentAction, str]]) β List of tuples of AgentAction and observation strings.
template_tool_response (str) β Template to format the observation with. Defaults to β{observation}β.
- Returns
The scratchpad.
- Return type
List[BaseMessage]