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]