agsamantha/node_modules/langchain/dist/agents/format_scratchpad/xml.cjs
2024-10-02 15:15:21 -05:00

12 lines
441 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatXml = void 0;
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;
}
exports.formatXml = formatXml;