Token expired time fucntion is ready

This commit is contained in:
RockYang
2023-04-06 09:56:56 +08:00
parent d8cb2c220e
commit 7e1e408b64
6 changed files with 68 additions and 46 deletions

View File

@@ -15,11 +15,14 @@ type Config struct {
type User struct {
Name string `json:"name"`
MaxCalls int `json:"max_calls"` // 最多调用次数,如果为 0 则表示不限制
RemainingCalls int `json:"remaining_calls"` // 剩余调用次数
EnableHistory bool `json:"enable_history"` // 是否启用聊天记录
Status bool `json:"status"` // 当前状态
ApiKey string `json:"api_key"` // OpenAI API KEY
MaxCalls int `json:"max_calls"` // 最多调用次数,如果为 0 则表示不限制
RemainingCalls int `json:"remaining_calls"` // 剩余调用次数
EnableHistory bool `json:"enable_history"` // 是否启用聊天记录
Status bool `json:"status"` // 当前状态
Term int `json:"term" default:"30"` // 会员有效期,单位:天
ActiveTime int64 `json:"active_time"` // 激活时间
ExpiredTime int64 `json:"expired_time"` // 到期时间
ApiKey string `json:"api_key"` // OpenAI API KEY
}
// Chat configs struct