|
@@ -7,6 +7,7 @@ import (
|
|
|
"eta/eta_api/models/aimod"
|
|
|
"eta/eta_api/services"
|
|
|
"eta/eta_api/services/aiser"
|
|
|
+ "eta/eta_api/services/alarm_msg"
|
|
|
"eta/eta_api/utils"
|
|
|
"fmt"
|
|
|
"os"
|
|
@@ -122,7 +123,6 @@ func (this *AiFileController) FileUpload() {
|
|
|
assistantId = topic.AssistantId
|
|
|
threadId = topic.ThreadId
|
|
|
}
|
|
|
-
|
|
|
if aiChatTopicId <= 0 { //新增
|
|
|
topic := new(aimod.AiChatTopic)
|
|
|
var filenameWithSuffix string
|
|
@@ -159,6 +159,14 @@ func (this *AiFileController) FileUpload() {
|
|
|
chatItem.OpenaiFilePath = resourceUrl
|
|
|
chatItem.CreateTime = time.Now()
|
|
|
chatItem.ModifyTime = time.Now()
|
|
|
+
|
|
|
+ bchat, err := json.Marshal(chatItem)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取数据失败!"
|
|
|
+ br.ErrMsg = "生成话题失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ alarm_msg.SendAlarmMsg(string(bchat), 1)
|
|
|
_, err = aimod.AddAiChat(chatItem)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取数据失败!"
|