mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-05 04:19:02 +08:00
fix: o1模型支持流式输出 #439
This commit is contained in:
parent
0d1fa453af
commit
d875f72793
@ -39,13 +39,6 @@ export default class OpenAIProvider extends BaseProvider {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
private isSupportStreamOutput(modelId: string): boolean {
|
|
||||||
if (modelId.includes('o1-')) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
private get isNotSupportFiles() {
|
private get isNotSupportFiles() {
|
||||||
const providers = ['deepseek', 'baichuan', 'minimax', 'doubao']
|
const providers = ['deepseek', 'baichuan', 'minimax', 'doubao']
|
||||||
return providers.includes(this.provider.id)
|
return providers.includes(this.provider.id)
|
||||||
@ -137,7 +130,7 @@ export default class OpenAIProvider extends BaseProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isOpenAIo1 = model.id.includes('o1-')
|
const isOpenAIo1 = model.id.includes('o1-')
|
||||||
const isSupportStreamOutput = streamOutput && this.isSupportStreamOutput(model.id)
|
const isSupportStreamOutput = streamOutput
|
||||||
|
|
||||||
// @ts-ignore key is not typed
|
// @ts-ignore key is not typed
|
||||||
const stream = await this.sdk.chat.completions.create({
|
const stream = await this.sdk.chat.completions.create({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user