update the data struct of API KEYS

This commit is contained in:
RockYang
2023-05-02 12:06:02 +08:00
parent 523cd4d4c9
commit 556abf5276
5 changed files with 83 additions and 19 deletions

View File

@@ -37,7 +37,7 @@ type Manager struct {
// Chat configs struct
type Chat struct {
ApiURL string
ApiKeys []string
ApiKeys []APIKey
Model string
Temperature float32
MaxTokens int
@@ -45,6 +45,11 @@ type Chat struct {
ChatContextExpireTime int // 聊天上下文过期时间,单位:秒
}
type APIKey struct {
Value string `json:"value"` // Key value
LastUsed int64 `json:"last_used"` // 最后使用时间
}
// Session configs struct
type Session struct {
SecretKey string // session encryption key