19 lines
489 B
Go
19 lines
489 B
Go
package util
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/util/gconv"
|
|
)
|
|
|
|
// GetModelPrompt 获取请求模型的提示词
|
|
func GetModelPrompt(ctx context.Context, Type int) string {
|
|
return g.Cfg().MustGet(ctx, "modelPrompts.types."+gconv.String(Type), "").String()
|
|
}
|
|
|
|
// GetBuildPrompt 获取构建提示词
|
|
func GetBuildPrompt(ctx context.Context, Type int) string {
|
|
return g.Cfg().MustGet(ctx, "buildProject.types."+gconv.String(Type), "").String()
|
|
}
|