mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-04 20:00:00 +08:00
feat: add support for o1 models and update provider configurations
This commit is contained in:
parent
909e88f8a3
commit
9dadef6df3
@ -144,7 +144,8 @@ const visionAllowedModels = [
|
|||||||
'pixtral',
|
'pixtral',
|
||||||
'gpt-4(?:-[\\w-]+)',
|
'gpt-4(?:-[\\w-]+)',
|
||||||
'gpt-4o(?:-[\\w-]+)?',
|
'gpt-4o(?:-[\\w-]+)?',
|
||||||
'chatgpt-4o(?:-[\\w-]+)?'
|
'chatgpt-4o(?:-[\\w-]+)?',
|
||||||
|
'o1(?:-[\\w-]+)?'
|
||||||
]
|
]
|
||||||
|
|
||||||
const visionExcludedModels = ['gpt-4-\\d+-preview', 'gpt-4-turbo-preview', 'gpt-4-32k', 'gpt-4-\\d+']
|
const visionExcludedModels = ['gpt-4-\\d+-preview', 'gpt-4-turbo-preview', 'gpt-4-32k', 'gpt-4-\\d+']
|
||||||
|
|||||||
@ -358,7 +358,7 @@ export const PROVIDER_CONFIG = {
|
|||||||
},
|
},
|
||||||
aihubmix: {
|
aihubmix: {
|
||||||
api: {
|
api: {
|
||||||
url: 'https://aihubmix.com?aff=SJyh'
|
url: 'https://aihubmix.com'
|
||||||
},
|
},
|
||||||
websites: {
|
websites: {
|
||||||
official: 'https://aihubmix.com?aff=SJyh',
|
official: 'https://aihubmix.com?aff=SJyh',
|
||||||
|
|||||||
@ -165,7 +165,7 @@ export default class OpenAIProvider extends BaseProvider {
|
|||||||
const isOpenAIo1 = model.id.startsWith('o1')
|
const isOpenAIo1 = model.id.startsWith('o1')
|
||||||
|
|
||||||
const isSupportStreamOutput = () => {
|
const isSupportStreamOutput = () => {
|
||||||
if (this.provider.id === 'github' && isOpenAIo1) {
|
if (isOpenAIo1) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return streamOutput
|
return streamOutput
|
||||||
@ -251,7 +251,7 @@ export default class OpenAIProvider extends BaseProvider {
|
|||||||
if (!onResponse) {
|
if (!onResponse) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (this.provider.id === 'github' && isOpenAIo1) {
|
if (isOpenAIo1) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user