Skip to content

Commit 297a7d8

Browse files
committed
prettier
1 parent 0f521ea commit 297a7d8

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,7 @@ const transformTools = (attributes: Record<string, any>): void => {
270270
if (schema) {
271271
attributes[
272272
`${SpanAttributes.LLM_REQUEST_FUNCTIONS}.${index}.parameters`
273-
] =
274-
typeof schema === "string" ? schema : JSON.stringify(schema);
273+
] = typeof schema === "string" ? schema : JSON.stringify(schema);
275274
}
276275
}
277276
});

packages/traceloop-sdk/test/ai-sdk-transformations.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2855,10 +2855,14 @@ describe("AI SDK Transformations", () => {
28552855
assert.strictEqual(attributes[ATTR_GEN_AI_REQUEST_MODEL], "gpt-4o");
28562856
assert.strictEqual(attributes[ATTR_GEN_AI_SYSTEM], "OpenAI");
28572857
assert.strictEqual(attributes[ATTR_GEN_AI_OPERATION_NAME], "chat");
2858-
assert.deepStrictEqual(attributes[ATTR_GEN_AI_RESPONSE_FINISH_REASONS], [
2859-
"tool_calls",
2860-
]);
2861-
assert.strictEqual(attributes[SpanAttributes.LLM_USAGE_TOTAL_TOKENS], 75);
2858+
assert.deepStrictEqual(
2859+
attributes[ATTR_GEN_AI_RESPONSE_FINISH_REASONS],
2860+
["tool_calls"],
2861+
);
2862+
assert.strictEqual(
2863+
attributes[SpanAttributes.LLM_USAGE_TOTAL_TOKENS],
2864+
75,
2865+
);
28622866
});
28632867
});
28642868
});

0 commit comments

Comments
 (0)