File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ export const AI21ChatCompleteResponseTransform: (
147147 if ( 'outputs' in response ) {
148148 return {
149149 id : response . id ,
150- object : 'chat_completion ' ,
150+ object : 'chat.completion ' ,
151151 created : Math . floor ( Date . now ( ) / 1000 ) ,
152152 model : '' ,
153153 provider : AI21 ,
Original file line number Diff line number Diff line change @@ -486,7 +486,7 @@ export const AnthropicChatCompleteResponseTransform: (
486486
487487 return {
488488 id : response . id ,
489- object : 'chat_completion ' ,
489+ object : 'chat.completion ' ,
490490 created : Math . floor ( Date . now ( ) / 1000 ) ,
491491 model : response . model ,
492492 provider : ANTHROPIC ,
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ export const CohereChatCompleteResponseTransform: (
162162
163163 return {
164164 id : response . generation_id ,
165- object : 'chat_completion ' ,
165+ object : 'chat.completion ' ,
166166 created : Math . floor ( Date . now ( ) / 1000 ) ,
167167 model : 'Unknown' ,
168168 provider : COHERE ,
Original file line number Diff line number Diff line change @@ -434,7 +434,7 @@ export const GoogleChatCompleteResponseTransform: (
434434
435435 return {
436436 id : 'portkey-' + crypto . randomUUID ( ) ,
437- object : 'chat_completion ' ,
437+ object : 'chat.completion ' ,
438438 created : Math . floor ( Date . now ( ) / 1000 ) ,
439439 model : response . modelVersion ,
440440 provider : GOOGLE_VERTEX_AI ,
@@ -731,7 +731,7 @@ export const VertexAnthropicChatCompleteResponseTransform: (
731731
732732 return {
733733 id : response . id ,
734- object : 'chat_completion ' ,
734+ object : 'chat.completion ' ,
735735 created : Math . floor ( Date . now ( ) / 1000 ) ,
736736 model : response . model ,
737737 provider : GOOGLE_VERTEX_AI ,
Original file line number Diff line number Diff line change @@ -512,7 +512,7 @@ export const GoogleChatCompleteResponseTransform: (
512512 if ( 'candidates' in response ) {
513513 return {
514514 id : 'portkey-' + crypto . randomUUID ( ) ,
515- object : 'chat_completion ' ,
515+ object : 'chat.completion ' ,
516516 created : Math . floor ( Date . now ( ) / 1000 ) ,
517517 model : response . modelVersion ,
518518 provider : 'google' ,
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ export const PalmChatCompleteResponseTransform: (
9191 if ( 'candidates' in response ) {
9292 return {
9393 id : Date . now ( ) . toString ( ) ,
94- object : 'chat_completion ' ,
94+ object : 'chat.completion ' ,
9595 created : Math . floor ( Date . now ( ) / 1000 ) ,
9696 model : 'Unknown' ,
9797 provider : PALM ,
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ export const RekaAIChatCompleteResponseTransform: (
164164 if ( 'text' in response ) {
165165 return {
166166 id : crypto . randomUUID ( ) ,
167- object : 'chat_completion ' ,
167+ object : 'chat.completion ' ,
168168 created : Math . floor ( Date . now ( ) / 1000 ) ,
169169 model : 'Unknown' ,
170170 provider : REKA_AI ,
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ export const WorkersAiChatCompleteResponseTransform: (
106106 if ( 'result' in response ) {
107107 return {
108108 id : Date . now ( ) . toString ( ) ,
109- object : 'chat_completion ' ,
109+ object : 'chat.completion ' ,
110110 created : Math . floor ( Date . now ( ) / 1000 ) ,
111111 model : gatewayRequest . model || '' ,
112112 provider : WORKERS_AI ,
You can’t perform that action at this time.
0 commit comments