mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-11 16:39:15 +08:00
fix(ThinkingTagExtraction): add new tag configuration for 'kimi-vl-a3b-thinking' model (#8459)
* feat(ThinkingTagExtraction): add new tag configuration for 'kimi-vl-a3b-thinking' model and update model regex patterns in config - Introduced a new tag configuration for the 'kimi-vl-a3b-thinking' model in ThinkingTagExtractionMiddleware. - Updated models.ts to include regex patterns for 'kimi-vl-a3b-thinking', 'llama-guard-4', and 'llama-4' to enhance model compatibility. * feat(models): add regex pattern for 'gemma3' model to enhance model compatibility
This commit is contained in:
parent
a16585ca51
commit
2721930294
@ -20,12 +20,15 @@ export const MIDDLEWARE_NAME = 'ThinkingTagExtractionMiddleware'
|
||||
const reasoningTags: TagConfig[] = [
|
||||
{ openingTag: '<think>', closingTag: '</think>', separator: '\n' },
|
||||
{ openingTag: '<thought>', closingTag: '</thought>', separator: '\n' },
|
||||
{ openingTag: '###Thinking', closingTag: '###Response', separator: '\n' }
|
||||
{ openingTag: '###Thinking', closingTag: '###Response', separator: '\n' },
|
||||
{ openingTag: '◁think▷', closingTag: '◁/think▷', separator: '\n' },
|
||||
{ openingTag: '<thinking>', closingTag: '</thinking>', separator: '\n' }
|
||||
]
|
||||
|
||||
const getAppropriateTag = (model?: Model): TagConfig => {
|
||||
if (model?.id?.includes('qwen3')) return reasoningTags[0]
|
||||
if (model?.id?.includes('gemini-2.5')) return reasoningTags[1]
|
||||
if (model?.id?.includes('kimi-vl-a3b-thinking')) return reasoningTags[3]
|
||||
// 可以在这里添加更多模型特定的标签配置
|
||||
return reasoningTags[0] // 默认使用 <think> 标签
|
||||
}
|
||||
|
||||
@ -186,7 +186,10 @@ const visionAllowedModels = [
|
||||
'gemma-3(?:-[\\w-]+)',
|
||||
'doubao-seed-1[.-]6(?:-[\\w-]+)?',
|
||||
'kimi-thinking-preview',
|
||||
`gemma3(?:-[\\w-]+)`
|
||||
`gemma3(?:-[\\w-]+)`,
|
||||
'kimi-vl-a3b-thinking(?:-[\\w-]+)?',
|
||||
'llama-guard-4(?:-[\\w-]+)?',
|
||||
'llama-4(?:-[\\w-]+)?'
|
||||
]
|
||||
|
||||
const visionExcludedModels = [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user