|
@@ -11,9 +11,10 @@ import (
|
|
|
"eta_gn/eta_api/services/aiser"
|
|
|
"eta_gn/eta_api/utils"
|
|
|
"fmt"
|
|
|
- "github.com/rdlucklib/rdluck_tools/paging"
|
|
|
"strconv"
|
|
|
"time"
|
|
|
+
|
|
|
+ "github.com/rdlucklib/rdluck_tools/paging"
|
|
|
)
|
|
|
|
|
|
// AiSummaryClassifyItems
|
|
@@ -1059,7 +1060,7 @@ func (this *AiController) GenerateAiSummary() {
|
|
|
return
|
|
|
}
|
|
|
if req.OriginContent == "" && len(req.OpenaiFileId) == 0 && req.SaDocId <= 0 {
|
|
|
- br.Msg = "参数错误"
|
|
|
+ br.Msg = "请选择文档或输入内容"
|
|
|
br.IsSendEmail = false
|
|
|
return
|
|
|
}
|
|
@@ -1155,8 +1156,14 @@ func (this *AiController) GenerateAiSummary() {
|
|
|
resp.Model = req.Model
|
|
|
|
|
|
if req.AiChatTopicId <= 0 { //新增
|
|
|
+ name, err := aiser.QueryAskContent(ask)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取数据失败!"
|
|
|
+ br.ErrMsg = "获取数据失败,QueryAskContent,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
topic := new(aimod.AiChatTopic)
|
|
|
- topic.TopicName = ask
|
|
|
+ topic.TopicName = name
|
|
|
topic.SysUserId = this.SysUser.AdminId
|
|
|
topic.SysUserRealName = this.SysUser.RealName
|
|
|
topic.CreateTime = time.Now()
|
|
@@ -1285,8 +1292,14 @@ func (this *AiController) GenerateAiSummary() {
|
|
|
}
|
|
|
|
|
|
if req.AiChatTopicId <= 0 { //新增
|
|
|
+ name, err := aiser.QueryAskContent(ask)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取数据失败!"
|
|
|
+ br.ErrMsg = "获取数据失败,QueryAskContent,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
topic := new(aimod.AiChatTopic)
|
|
|
- topic.TopicName = ask
|
|
|
+ topic.TopicName = name
|
|
|
topic.SysUserId = this.SysUser.AdminId
|
|
|
topic.SysUserRealName = this.SysUser.RealName
|
|
|
topic.CreateTime = time.Now()
|