File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,8 @@ class AwsMultipartUploadHandler {
142
142
this ,
143
143
partNumber ,
144
144
purpose ?? 'batch' ,
145
- modelType ?? 'chat'
145
+ modelType ?? 'chat' ,
146
+ this . providerOptions
146
147
) ;
147
148
this . contentLength += uploadLength ;
148
149
partNumber ++ ;
@@ -251,7 +252,8 @@ const transformAndUploadFileContentParts = async (
251
252
handler : AwsMultipartUploadHandler ,
252
253
partNumber : number ,
253
254
purpose : string ,
254
- modelType : string
255
+ modelType : string ,
256
+ providerOptions : Options
255
257
) : Promise < [ string , number ] > => {
256
258
let transformedChunkToUpload = '' ;
257
259
const jsonLines = chunk . split ( '\n' ) ;
@@ -279,7 +281,11 @@ const transformAndUploadFileContentParts = async (
279
281
}
280
282
const transformedLine = {
281
283
recordId : json . custom_id ,
282
- modelInput : transformUsingProviderConfig ( providerConfig , json . body ) ,
284
+ modelInput : transformUsingProviderConfig (
285
+ providerConfig ,
286
+ json . body ,
287
+ providerOptions
288
+ ) ,
283
289
} ;
284
290
transformedChunkToUpload += JSON . stringify ( transformedLine ) + '\r\n' ;
285
291
buffer = buffer . slice ( line . length + 1 ) ;
Original file line number Diff line number Diff line change @@ -122,7 +122,8 @@ export const GoogleFileUploadRequestHandler: RequestHandler<
122
122
const toTranspose = purpose === 'batch' ? json . body : json ;
123
123
const transformedBody = transformUsingProviderConfig (
124
124
providerConfig ,
125
- toTranspose
125
+ toTranspose ,
126
+ providerOptions
126
127
) ;
127
128
128
129
delete transformedBody [ 'model' ] ;
You can’t perform that action at this time.
0 commit comments