fix(prompt): 修复结构体类型请求中的自定义提示获取问题

This commit is contained in:
2026-06-18 15:42:03 +08:00
parent d304d0ee4a
commit 973085ffc8

View File

@@ -38,7 +38,7 @@ func buildNodeTypeRequest(ctx context.Context, req *dto.ComposeMessagesReq, chat
// buildStructTypeRequest 构建结构体类型请求BuildType=3
func buildStructTypeRequest(ctx context.Context, req *dto.ComposeMessagesReq, chatModel *gateway.AsynchModel, ir *IR) (map[string]any, error) {
customPrompt := gjson.New(req.UserForm).Get("0.prompt").String()
customPrompt := req.UserPrompt
ir.AddSystem(customPrompt)
ir.AddUser(buildUserPrompt(ctx, req))
return compileToProviderRequest(ctx, ir, chatModel, req, customPrompt)