mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-13 04:38:00 +08:00
增加不同上下文模式
This commit is contained in:
@@ -48,6 +48,7 @@ type ConfigReader interface {
|
||||
CurrentInputFileEnabled() bool
|
||||
CurrentInputFileMinChars() int
|
||||
ThinkingInjectionEnabled() bool
|
||||
ThinkingInjectionPrompt() string
|
||||
}
|
||||
|
||||
type Deps struct {
|
||||
|
||||
@@ -6,7 +6,7 @@ func ApplyThinkingInjection(store ConfigReader, stdReq promptcompat.StandardRequ
|
||||
if store == nil || !store.ThinkingInjectionEnabled() || !stdReq.Thinking {
|
||||
return stdReq
|
||||
}
|
||||
messages, changed := promptcompat.AppendThinkingInjectionToLatestUser(stdReq.Messages)
|
||||
messages, changed := promptcompat.AppendThinkingInjectionPromptToLatestUser(stdReq.Messages, store.ThinkingInjectionPrompt())
|
||||
if !changed {
|
||||
return stdReq
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user