From 2d1427e0e4f9f27ab2cba6dd87f137d7f372952e Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Mon, 12 May 2025 12:59:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E5=90=8D=E7=A7=B0=E8=BF=87?= =?UTF-8?q?=E9=95=BF=EF=BC=8C=E4=BD=BF=E7=94=A8ai=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=80=BB=E7=BB=93=E6=9B=B4=E6=96=B0,=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=85=8D=E7=BD=AE=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proto/conf.go | 29 +++++++++++++++-------------- service/imService.go | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/proto/conf.go b/proto/conf.go index d8dffff..1fe3b0a 100644 --- a/proto/conf.go +++ b/proto/conf.go @@ -78,20 +78,21 @@ type ConfigStruct struct { CID_BASE_DIR string `json:"cid_base_dir"` FILE_BASE_DIR string `json:"file_base_dir"` LOG_OUTPUT bool `json:"log_output"` - MONITOR bool `json:"monitor"` // 状态监控及邮件通知 - SERVER_SQL_LOG bool `json:"server_sql_log"` // 服务器sql日志 - SERVER_PORT string `json:"server_port"` // 服务端口 - LOG_SAVE_DAYS int `json:"log_save_days"` // 日志保存天数,-1表示不保存,0表示永久保存 - SERVER_USER_TYPE string `json:"user_type"` // 服务器用户类型,master: 主服务器,slave: 从服务器,从服务器会定时同步数据 - MASTER_SERVER_DOMAIN string `json:"master_server_domain"` // 主服务器域名 - USER_SYNC_TIME int `json:"user_sync_time"` // 用户数据同步时间,单位秒 - SERVER_NAME string `json:"server_name"` // 服务器名称,用于区分不同服务器 - SPARK_PPT_USAGE bool `json:"spark_ppt_usage"` // 是否使用spark ppt功能 - KBASE_SERVER []KBaseServer `json:"kbase_server"` // 知识库服务器列表 - GITHUB_CLIENT_ID string `json:"github_client_id"` // github client id - GITHUB_CLIENT_SECRET string `json:"github_client_secret"` // github client secret - GITEE_CLIENT_ID string `json:"gitee_client_id"` // gitee client id - GITEE_CLIENT_SECRET string `json:"gitee_client_secret"` // gitee client secret + AISessionNameModelID int `json:"ai_session_name_model_id"` // 用于ai总结会话名称的模型id + MONITOR bool `json:"monitor"` // 状态监控及邮件通知 + SERVER_SQL_LOG bool `json:"server_sql_log"` // 服务器sql日志 + SERVER_PORT string `json:"server_port"` // 服务端口 + LOG_SAVE_DAYS int `json:"log_save_days"` // 日志保存天数,-1表示不保存,0表示永久保存 + SERVER_USER_TYPE string `json:"user_type"` // 服务器用户类型,master: 主服务器,slave: 从服务器,从服务器会定时同步数据 + MASTER_SERVER_DOMAIN string `json:"master_server_domain"` // 主服务器域名 + USER_SYNC_TIME int `json:"user_sync_time"` // 用户数据同步时间,单位秒 + SERVER_NAME string `json:"server_name"` // 服务器名称,用于区分不同服务器 + SPARK_PPT_USAGE bool `json:"spark_ppt_usage"` // 是否使用spark ppt功能 + KBASE_SERVER []KBaseServer `json:"kbase_server"` // 知识库服务器列表 + GITHUB_CLIENT_ID string `json:"github_client_id"` // github client id + GITHUB_CLIENT_SECRET string `json:"github_client_secret"` // github client secret + GITEE_CLIENT_ID string `json:"gitee_client_id"` // gitee client id + GITEE_CLIENT_SECRET string `json:"gitee_client_secret"` // gitee client secret } type KBaseServer struct { diff --git a/service/imService.go b/service/imService.go index 6b9bddb..68dd4fe 100644 --- a/service/imService.go +++ b/service/imService.go @@ -26,7 +26,7 @@ func UpdateSessionNameByAIAndID(id, userID int, originSessionName string) error //获取ai总结的会话名称 prompt := "请根据下面的对话内容,提取为20字以内的主题作为会话名称:\n" + originSessionName //ai总结模型id - modelID := 24 //固定为混元lite模型,免费 + modelID := proto.Config.AISessionNameModelID //固定为混元lite模型,免费 models := FindModelByID(modelID, 1) if models == nil { log.Println("UpdateSessionNameByAIAndID model not exist")