mirror of
https://github.com/eryajf/chatgpt-dingtalk.git
synced 2025-10-06 00:26:51 +08:00
feat: 支持聊天记录存入以及查询的能力 (#158)
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/eryajf/chatgpt-dingtalk/config"
|
||||
"github.com/eryajf/chatgpt-dingtalk/pkg/cache"
|
||||
"github.com/eryajf/chatgpt-dingtalk/pkg/db"
|
||||
"github.com/eryajf/chatgpt-dingtalk/pkg/dingbot"
|
||||
"github.com/eryajf/chatgpt-dingtalk/pkg/logger"
|
||||
)
|
||||
@@ -15,9 +16,14 @@ var Config *config.Configuration
|
||||
var Prompt *[]config.Prompt
|
||||
|
||||
func InitSvc() {
|
||||
// 加载配置
|
||||
Config = config.LoadConfig()
|
||||
// 加载prompt
|
||||
Prompt = config.LoadPrompt()
|
||||
// 初始化缓存
|
||||
UserService = cache.NewUserService()
|
||||
// 初始化数据库
|
||||
db.InitDB()
|
||||
// 暂时不在初始化时获取余额
|
||||
// if Config.Model == openai.GPT3Dot5Turbo0301 || Config.Model == openai.GPT3Dot5Turbo {
|
||||
// _, _ = GetBalance()
|
||||
|
Reference in New Issue
Block a user