mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-05 04:19:02 +08:00
feat: Update Moonshot(Kimi) configs (#8372)
* feat:update kimi setting * feat:update kimi logo * mergei18n * 仅修复 eslint error Improves code readability by reformatting Moonshot provider configuration and related ternary expressions. Indentation and spacing are adjusted for consistency, with no functional changes. * change kimi logo to 200x200 * update * update 2 warnings in AssistantModelSettings.tsx * fix: lint error * fix: test error --------- Co-authored-by: 自由的世界人 <3196812536@qq.com> Co-authored-by: xiaochen <gongxiaochen@msh.team>
This commit is contained in:
parent
6c44f7fe24
commit
6102f88025
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 24 KiB |
@ -285,6 +285,10 @@ export function isFunctionCallingModel(model?: Model): boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
if (['kimi', 'moonshot'].includes(model.provider)) {
|
||||
return true
|
||||
}
|
||||
|
||||
return FUNCTION_CALLING_REGEX.test(model.id)
|
||||
}
|
||||
|
||||
@ -1267,7 +1271,21 @@ export const SYSTEM_MODELS: Record<string, Model[]> = {
|
||||
name: 'moonshot-v1-auto',
|
||||
provider: 'moonshot',
|
||||
group: 'moonshot-v1',
|
||||
owned_by: 'moonshot'
|
||||
owned_by: 'moonshot',
|
||||
type: ['text', 'function_calling']
|
||||
},
|
||||
{
|
||||
id: 'kimi-k2-0711-preview',
|
||||
name: 'kimi-k2-0711-preview',
|
||||
provider: 'moonshot',
|
||||
group: 'kimi-k2',
|
||||
owned_by: 'moonshot',
|
||||
type: ['text', 'function_calling'],
|
||||
pricing: {
|
||||
input_per_million_tokens: 0.6,
|
||||
output_per_million_tokens: 2.5,
|
||||
currencySymbol: 'USD'
|
||||
}
|
||||
}
|
||||
],
|
||||
baichuan: [
|
||||
|
||||
@ -327,7 +327,7 @@ export const PROVIDER_CONFIG = {
|
||||
url: 'https://api.moonshot.cn'
|
||||
},
|
||||
websites: {
|
||||
official: 'https://moonshot.ai/',
|
||||
official: 'https://www.moonshot.cn/',
|
||||
apiKey: 'https://platform.moonshot.cn/console/api-keys',
|
||||
docs: 'https://platform.moonshot.cn/docs/',
|
||||
models: 'https://platform.moonshot.cn/docs/intro#%E6%A8%A1%E5%9E%8B%E5%88%97%E8%A1%A8'
|
||||
|
||||
@ -180,8 +180,15 @@ const AssistantModelSettings: FC<Props> = ({ assistant, updateAssistant, updateA
|
||||
model: selectedModel,
|
||||
defaultModel: selectedModel
|
||||
})
|
||||
if (selectedModel.name.includes('kimi-k2')) {
|
||||
setTemperature(0.6)
|
||||
setTimeout(() => updateAssistantSettings({ temperature: 0.6 }), 500)
|
||||
} else if (selectedModel.name.includes('moonshot')) {
|
||||
setTemperature(0.3)
|
||||
setTimeout(() => updateAssistantSettings({ temperature: 0.3 }), 500)
|
||||
}
|
||||
}
|
||||
}, [assistant, defaultModel, updateAssistant])
|
||||
}, [assistant, defaultModel, updateAssistant, updateAssistantSettings])
|
||||
|
||||
useEffect(() => {
|
||||
return () => updateAssistantSettings({ customParameters: customParametersRef.current })
|
||||
|
||||
Loading…
Reference in New Issue
Block a user