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