|
@@ -123,7 +123,7 @@ func (this *AiFileController) FileUpload() {
|
|
|
|
|
|
if aiChatTopicId <= 0 { //新增
|
|
|
topic := new(aimod.AiChatTopic)
|
|
|
- topic.TopicName = fileName
|
|
|
+ topic.TopicName = path.Base(uploadFileName)
|
|
|
topic.SysUserId = this.SysUser.AdminId
|
|
|
topic.SysUserRealName = this.SysUser.RealName
|
|
|
topic.CreateTime = time.Now()
|
|
@@ -139,8 +139,8 @@ func (this *AiFileController) FileUpload() {
|
|
|
aiChatTopicId = int(topicId)
|
|
|
chatItem := new(aimod.AiChat)
|
|
|
chatItem.AiChatTopicId = aiChatTopicId
|
|
|
- chatItem.Ask = fileName
|
|
|
- chatItem.AskUuid = utils.MD5(fileName)
|
|
|
+ chatItem.Ask = uploadFileName
|
|
|
+ chatItem.AskUuid = utils.MD5(uploadFileName)
|
|
|
chatItem.Model = "gpt-4-1106-preview"
|
|
|
chatItem.SysUserId = this.SysUser.AdminId
|
|
|
chatItem.SysUserRealName = this.SysUser.RealName
|
|
@@ -160,7 +160,7 @@ func (this *AiFileController) FileUpload() {
|
|
|
} else {
|
|
|
chatItem := new(aimod.AiChat)
|
|
|
chatItem.AiChatTopicId = aiChatTopicId
|
|
|
- chatItem.Ask = fileName
|
|
|
+ chatItem.Ask = uploadFileName
|
|
|
chatItem.AskUuid = utils.MD5(fileName)
|
|
|
chatItem.Model = "gpt-4-1106-preview"
|
|
|
chatItem.SysUserId = this.SysUser.AdminId
|