|
@@ -15,8 +15,13 @@ type BigModel struct {
|
|
func (b *BigModel) RequestAiPlatform(req *dto.AskAiModel, resp *dto.BigModelResp) error {
|
|
func (b *BigModel) RequestAiPlatform(req *dto.AskAiModel, resp *dto.BigModelResp) error {
|
|
token := "2029160c1fdae2de4a30d989080dc2ef.YsXIveZGpmeUhROe"
|
|
token := "2029160c1fdae2de4a30d989080dc2ef.YsXIveZGpmeUhROe"
|
|
url := "https://open.bigmodel.cn/api/paas/v4/chat/completions"
|
|
url := "https://open.bigmodel.cn/api/paas/v4/chat/completions"
|
|
|
|
+ tips := "是什么问题,请言简意赅解释“问题原因”以及“排查思路”,必须使用中文回答,只分析客观的技术问题,不需要加最后的简单总结或者其他帮助方法,不要加任何总结性文字。问题答案输出为标准且好看的html格式"
|
|
fmt.Println("content:", req.Content)
|
|
fmt.Println("content:", req.Content)
|
|
- content := fmt.Sprintf("'%s'是什么问题,请言简意赅的介绍,简要介绍排查思路,不需要加最后的简单总结", req.Content)
|
|
|
|
|
|
+ content := fmt.Sprintf(
|
|
|
|
+ "“%s”%s",
|
|
|
|
+ req.Content,
|
|
|
|
+ tips,
|
|
|
|
+ )
|
|
bpm := []dto.BigModelParamsMessage{
|
|
bpm := []dto.BigModelParamsMessage{
|
|
{
|
|
{
|
|
Role: "user",
|
|
Role: "user",
|