Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
|
// Global Map to track tool call IDs to their corresponding spans
|
|
// This allows us to capture tool errors and link them to the correct span
|
|
const toolCallSpanMap = new Map();
|
|
|
|
// Operation sets for efficient mapping to OpenTelemetry semantic convention values
|
|
const INVOKE_AGENT_OPS = new Set([
|
|
'ai.generateText',
|
|
'ai.streamText',
|
|
'ai.generateObject',
|
|
'ai.streamObject',
|
|
'ai.embed',
|
|
'ai.embedMany',
|
|
'ai.rerank',
|
|
]);
|
|
|
|
const GENERATE_CONTENT_OPS = new Set([
|
|
'ai.generateText.doGenerate',
|
|
'ai.streamText.doStream',
|
|
'ai.generateObject.doGenerate',
|
|
'ai.streamObject.doStream',
|
|
]);
|
|
|
|
const EMBEDDINGS_OPS = new Set(['ai.embed.doEmbed', 'ai.embedMany.doEmbed']);
|
|
|
|
const RERANK_OPS = new Set(['ai.rerank.doRerank']);
|
|
|
|
exports.EMBEDDINGS_OPS = EMBEDDINGS_OPS;
|
|
exports.GENERATE_CONTENT_OPS = GENERATE_CONTENT_OPS;
|
|
exports.INVOKE_AGENT_OPS = INVOKE_AGENT_OPS;
|
|
exports.RERANK_OPS = RERANK_OPS;
|
|
exports.toolCallSpanMap = toolCallSpanMap;
|
|
//# sourceMappingURL=constants.js.map
|