# format_log_to_str

> **Function** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/agents/format_scratchpad/log/format_log_to_str)

Construct the scratchpad that lets the agent continue its thought process.

## Signature

```python
format_log_to_str(
    intermediate_steps: list[tuple[AgentAction, str]],
    observation_prefix: str = 'Observation: ',
    llm_prefix: str = 'Thought: ',
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `intermediate_steps` | `list[tuple[AgentAction, str]]` | Yes | List of tuples of AgentAction and observation strings. |
| `observation_prefix` | `str` | No | Prefix to append the observation with. (default: `'Observation: '`) |
| `llm_prefix` | `str` | No | Prefix to append the llm call with. (default: `'Thought: '`) |

## Returns

`str`

The scratchpad.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/b302691ff9ad841804e93e5addbdc53b6974473b/libs/langchain/langchain_classic/agents/format_scratchpad/log.py#L4)