feat(ui): Support multi knowledgebases operation

This commit is contained in:
wizardchen
2025-09-17 16:02:08 +08:00
parent 0292b3ce36
commit 98e47e83d2
39 changed files with 1718 additions and 4839 deletions
+8
View File
@@ -85,6 +85,7 @@ func (c *RemoteAPIChat) buildChatCompletionRequest(messages []Message,
Messages: c.convertMessages(messages),
Stream: isStream,
}
thinking := false
// 添加可选参数
if opts != nil {
@@ -106,6 +107,13 @@ func (c *RemoteAPIChat) buildChatCompletionRequest(messages []Message,
if opts.PresencePenalty > 0 {
req.PresencePenalty = float32(opts.PresencePenalty)
}
if opts.Thinking != nil {
thinking = *opts.Thinking
}
}
req.ChatTemplateKwargs = map[string]interface{}{
"enable_thinking": thinking,
}
return req