2026-05-18 19:19:17 +08:00
|
|
|
package util
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
|
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
|
|
|
"github.com/gogf/gf/v2/util/gconv"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// GetModelPrompt 获取请求模型的提示词
|
2026-05-20 11:36:39 +08:00
|
|
|
func GetModelPrompt(ctx context.Context, modelType int) string {
|
|
|
|
|
key := "modelPrompts.types." + gconv.String(modelType)
|
|
|
|
|
return g.Cfg().MustGet(ctx, key, "").String()
|
2026-05-18 19:19:17 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-20 11:36:39 +08:00
|
|
|
// GetBuildPrompt 获取节点构建提示词
|
|
|
|
|
func GetBuildPrompt(ctx context.Context) string {
|
|
|
|
|
return g.Cfg().MustGet(ctx, "nodePrompts", "").String()
|
2026-05-18 19:19:17 +08:00
|
|
|
}
|