@@ -132,7 +132,7 @@ openaiRouter.post('/stream', upload.single('file'), async (r, res) => {
132
132
return
133
133
}
134
134
135
- const events = await getCompletionEventsV2 ( options as AzureOptionsV2 )
135
+ const events = await getCompletionEventsV2 ( options )
136
136
137
137
if ( isError ( events ) ) {
138
138
res . status ( 424 )
@@ -141,12 +141,7 @@ openaiRouter.post('/stream', upload.single('file'), async (r, res) => {
141
141
142
142
res . setHeader ( 'content-type' , 'text/event-stream' )
143
143
144
- const completion = await streamCompletionV2 (
145
- events ,
146
- options as AzureOptionsV2 ,
147
- encoding ,
148
- res
149
- )
144
+ const completion = await streamCompletionV2 ( events , encoding , res )
150
145
151
146
tokenCount += completion . tokenCount
152
147
@@ -241,7 +236,7 @@ openaiRouter.post(
241
236
return
242
237
}
243
238
244
- const events = await getCompletionEventsV2 ( options as AzureOptionsV2 )
239
+ const events = await getCompletionEventsV2 ( options )
245
240
246
241
if ( isError ( events ) ) {
247
242
res . status ( 424 ) . send ( events )
@@ -250,12 +245,7 @@ openaiRouter.post(
250
245
251
246
res . setHeader ( 'content-type' , 'text/event-stream' )
252
247
253
- const completion = await streamCompletionV2 (
254
- events ,
255
- options as AzureOptionsV2 ,
256
- encoding ,
257
- res
258
- )
248
+ const completion = await streamCompletionV2 ( events , encoding , res )
259
249
260
250
tokenCount += completion . tokenCount
261
251
0 commit comments