format_xml#

langchain.agents.format_scratchpad.xml.format_xml(
intermediate_steps: list[tuple[AgentAction, str]],
*,
escape_format: Literal['minimal'] | None = 'minimal',
) β†’ str[source]#

Format the intermediate steps as XML.

Parameters:
  • intermediate_steps (list[tuple[AgentAction, str]]) – The intermediate steps.

  • escape_format (Literal['minimal'] | None) – The escaping format to use. Currently only β€˜minimal’ is supported, which replaces XML tags with custom delimiters to prevent conflicts.

Returns:

The intermediate steps as XML.

Return type:

str