@openai/agents-core
Version:
The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.
20 lines • 775 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.saveAgentToolRunResult = saveAgentToolRunResult;
exports.consumeAgentToolRunResult = consumeAgentToolRunResult;
// Per-process, ephemeral map linking a function tool call to its nested
// agent run result within the same run; entry is removed after consumption.
const agentToolRunResults = new WeakMap();
function saveAgentToolRunResult(toolCall, runResult) {
if (toolCall) {
agentToolRunResults.set(toolCall, runResult);
}
}
function consumeAgentToolRunResult(toolCall) {
const runResult = agentToolRunResults.get(toolCall);
if (runResult) {
agentToolRunResults.delete(toolCall);
}
return runResult;
}
//# sourceMappingURL=agentToolRunResults.js.map