fix: 翻译的temperature改为0.7
improve: 模型特性默认支持的时候,打勾
This commit is contained in:
parent
6fb79c17d2
commit
3049023266
@ -186,19 +186,31 @@ const ProviderSetting: FC<Props> = ({ provider: _provider }) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const modelTypeContent = (model: Model) => (
|
const modelTypeContent = (model: Model) => {
|
||||||
<div>
|
// 获取默认选中的类型
|
||||||
<Checkbox.Group
|
const defaultTypes = [
|
||||||
value={model.type}
|
...(VISION_REGEX.test(model.id) ? ['vision'] : []),
|
||||||
onChange={(types) => onUpdateModelTypes(model, types as ModelType[])}
|
...(EMBEDDING_REGEX.test(model.id) ? ['embedding'] : []),
|
||||||
options={[
|
...(REASONING_REGEX.test(model.id) ? ['reasoning'] : [])
|
||||||
{ label: t('models.type.vision'), value: 'vision', disabled: VISION_REGEX.test(model.id) },
|
] as ModelType[]
|
||||||
{ label: t('models.type.embedding'), value: 'embedding', disabled: EMBEDDING_REGEX.test(model.id) },
|
|
||||||
{ label: t('models.type.reasoning'), value: 'reasoning', disabled: REASONING_REGEX.test(model.id) }
|
// 合并现有选择和默认类型
|
||||||
]}
|
const selectedTypes = [...new Set([...(model.type || []), ...defaultTypes])]
|
||||||
/>
|
|
||||||
</div>
|
return (
|
||||||
)
|
<div>
|
||||||
|
<Checkbox.Group
|
||||||
|
value={selectedTypes}
|
||||||
|
onChange={(types) => onUpdateModelTypes(model, types as ModelType[])}
|
||||||
|
options={[
|
||||||
|
{ label: t('models.type.vision'), value: 'vision', disabled: VISION_REGEX.test(model.id) },
|
||||||
|
{ label: t('models.type.embedding'), value: 'embedding', disabled: EMBEDDING_REGEX.test(model.id) },
|
||||||
|
{ label: t('models.type.reasoning'), value: 'reasoning', disabled: REASONING_REGEX.test(model.id) }
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
const formatApiKeys = (value: string) => {
|
const formatApiKeys = (value: string) => {
|
||||||
return value.replaceAll(',', ',').replaceAll(' ', ',').replaceAll(' ', '').replaceAll('\n', ',')
|
return value.replaceAll(',', ',').replaceAll(' ', ',').replaceAll(' ', '').replaceAll('\n', ',')
|
||||||
|
|||||||
@ -25,7 +25,7 @@ export function getDefaultTranslateAssistant(targetLanguage: string, text: strin
|
|||||||
assistant.model = translateModel
|
assistant.model = translateModel
|
||||||
|
|
||||||
assistant.settings = {
|
assistant.settings = {
|
||||||
temperature: 1.3
|
temperature: 0.7
|
||||||
}
|
}
|
||||||
|
|
||||||
assistant.prompt = store
|
assistant.prompt = store
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user