feat(prompt): 添加用户提示词功能支持
This commit is contained in:
@@ -140,11 +140,14 @@ func fillEmptyInPlace(m map[string]any, value string) {
|
||||
// ======================== 系统提示词合并 ========================
|
||||
|
||||
// MergeSystemPrompt 将系统提示词和技能内容拼接到 system role 的 content 中
|
||||
func MergeSystemPrompt(messages map[string]any, prompt, skills string, requestMapping map[string]any) map[string]any {
|
||||
func MergeSystemPrompt(messages map[string]any, prompt, skills, userPrompt string, requestMapping map[string]any) map[string]any {
|
||||
var parts []string
|
||||
if prompt != "" {
|
||||
parts = append(parts, prompt)
|
||||
}
|
||||
if userPrompt != "" {
|
||||
parts = append(parts, userPrompt)
|
||||
}
|
||||
if skills != "" {
|
||||
parts = append(parts, skills)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user