mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-09 18:53:43 +08:00
refactor: add system config key 'user_init_calls' to init the new register user's api calls
This commit is contained in:
@@ -43,5 +43,5 @@ type ApiError struct {
|
||||
}
|
||||
}
|
||||
|
||||
const PROMPT_MSG = "prompt" // prompt message
|
||||
const REPLY_MSG = "reply" // reply message
|
||||
const PromptMsg = "prompt" // prompt message
|
||||
const ReplyMsg = "reply" // reply message
|
||||
|
||||
@@ -33,7 +33,7 @@ type Session struct {
|
||||
|
||||
// ChatConfig 系统默认的聊天配置
|
||||
type ChatConfig struct {
|
||||
ApiURL string `json:"api_url"`
|
||||
ApiURL string `json:"api_url,omitempty"`
|
||||
Model string `json:"model"` // 默认模型
|
||||
Temperature float32 `json:"temperature"`
|
||||
MaxTokens int `json:"max_tokens"`
|
||||
@@ -43,9 +43,12 @@ type ChatConfig struct {
|
||||
}
|
||||
|
||||
type SystemConfig struct {
|
||||
Title string `json:"title"`
|
||||
AdminTitle string `json:"admin_title"`
|
||||
Models []string `json:"models"`
|
||||
Title string `json:"title"`
|
||||
AdminTitle string `json:"admin_title"`
|
||||
Models []string `json:"models"`
|
||||
UserInitCalls int `json:"user_init_calls"` // 新用户注册默认总送多少次调用
|
||||
}
|
||||
|
||||
var GptModels = []string{"gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-16k-0613", "gpt-4", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0613"}
|
||||
|
||||
const UserInitCalls = 1000
|
||||
|
||||
Reference in New Issue
Block a user