Skip to content

Commit 7e70820

Browse files
committed
updating tagger to check data as null
1 parent 25e0183 commit 7e70820

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/dd-trace/src/llmobs/plugins/genai.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,11 @@ class GenAiLLMObsPlugin extends LLMObsPlugin {
352352
// ============================================================================
353353

354354
_formatFunctionCallMessage (parts, functionCalls, role) {
355+
console.log('formatFunctionCallMessage called!!!!!!!!!!', functionCalls)
355356
const toolCalls = functionCalls.map(part => ({
356357
name: part.functionCall.name,
357358
arguments: part.functionCall.args,
358-
toolId: part.functionCall.id,
359+
toolId: part.functionCall.id || '',
359360
type: 'function_call'
360361
}))
361362

packages/dd-trace/src/llmobs/tagger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ class LLMObsTagger {
380380
}
381381

382382
#tagConditionalString (data, type, carrier, key) {
383-
if (!data) return true
383+
if (data == null) return true
384384
if (typeof data !== 'string') {
385385
this.#handleFailure(`"${type}" must be a string.`)
386386
return false

0 commit comments

Comments
 (0)