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: ',
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