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")