feat: allow o1 streaming
This commit is contained in:
parent
bfeca0b383
commit
d4848faa5a
@ -197,12 +197,7 @@ export default class OpenAIProvider extends BaseProvider {
|
|||||||
userMessages.push(await this.getMessageParam(message, model))
|
userMessages.push(await this.getMessageParam(message, model))
|
||||||
}
|
}
|
||||||
|
|
||||||
const isOpenAIo1 = this.isOpenAIo1(model)
|
|
||||||
|
|
||||||
const isSupportStreamOutput = () => {
|
const isSupportStreamOutput = () => {
|
||||||
if (isOpenAIo1) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return streamOutput
|
return streamOutput
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,15 +327,10 @@ export default class OpenAIProvider extends BaseProvider {
|
|||||||
]
|
]
|
||||||
: [{ role: 'user', content: assistant.prompt }]
|
: [{ role: 'user', content: assistant.prompt }]
|
||||||
|
|
||||||
const isOpenAIo1 = this.isOpenAIo1(model)
|
|
||||||
|
|
||||||
const isSupportedStreamOutput = () => {
|
const isSupportedStreamOutput = () => {
|
||||||
if (!onResponse) {
|
if (!onResponse) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (isOpenAIo1) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user