format_log_to_str#

langchain.agents.format_scratchpad.log.format_log_to_str(intermediate_steps: List[Tuple[AgentAction, str]], observation_prefix: str = 'Observation: ', llm_prefix: str = 'Thought: ') โ†’ str[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.

  • observation_prefix (str) โ€“ Prefix to append the observation with. Defaults to โ€œObservation: โ€œ.

  • llm_prefix (str) โ€“ Prefix to append the llm call with. Defaults to โ€œThought: โ€œ.

Returns:

The scratchpad.

Return type:

str

Examples using format_log_to_str