8 lines
312 B
JavaScript
8 lines
312 B
JavaScript
export function formatXml(intermediateSteps) {
|
|
let log = "";
|
|
for (const step of intermediateSteps) {
|
|
const { action, observation } = step;
|
|
log += `<tool>${action.tool}</tool><tool_input>${action.toolInput}\n</tool_input><observation>${observation}</observation>`;
|
|
}
|
|
return log;
|
|
}
|