File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
packages/core/src/tracing/openai Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -32,15 +32,15 @@ import type {
3232 ResponseStreamingEvent ,
3333} from './types' ;
3434import {
35+ addChatCompletionAttributes ,
36+ addEmbeddingsAttributes ,
37+ addResponsesApiAttributes ,
3538 buildMethodPath ,
3639 getOperationName ,
3740 getSpanOperation ,
3841 isChatCompletionResponse ,
3942 isEmbeddingsResponse ,
4043 isResponsesApiResponse ,
41- addChatCompletionAttributes ,
42- addResponsesApiAttributes ,
43- addEmbeddingsAttributes ,
4444 shouldInstrument ,
4545} from './utils' ;
4646
Original file line number Diff line number Diff line change 11import type { Span } from '../../types-hoist/span' ;
22import {
3+ GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE ,
34 GEN_AI_RESPONSE_ID_ATTRIBUTE ,
45 GEN_AI_RESPONSE_MODEL_ATTRIBUTE ,
6+ GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE ,
57 GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE ,
68 GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE ,
79 GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE ,
8- GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE ,
9- GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE ,
1010 OPENAI_OPERATIONS ,
1111 OPENAI_RESPONSE_ID_ATTRIBUTE ,
1212 OPENAI_RESPONSE_MODEL_ATTRIBUTE ,
@@ -97,7 +97,7 @@ export function isEmbeddingsResponse(response: unknown): response is OpenAICreat
9797 return (
9898 responseObject . object === 'list' &&
9999 typeof responseObject . model === 'string' &&
100- ( responseObject . model as string ) . toLowerCase ( ) . includes ( 'embedding' )
100+ ( responseObject . model ) . toLowerCase ( ) . includes ( 'embedding' )
101101 ) ;
102102}
103103
You can’t perform that action at this time.
0 commit comments