Skip to content

Commit

Permalink
Merge branch 'cofing' of https://github.com/869413421/wechatbot into …
Browse files Browse the repository at this point in the history
…config
  • Loading branch information
869413421 committed Dec 9, 2022
2 parents 9247d4e + 652b7ce commit cfeded5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ type Configuration struct {
AutoPass bool `json:"auto_pass"`
// 会话超时时间
SessionTimeout time.Duration `json:"session_timeout"`
// GPT请求最大字符数
MaxTokens uint `json:"max_tokens"`
// GPT模型
Model string `json:"model"`
// 热度
Temperature float32 `json:"temperature"`
}

var config *Configuration
Expand All @@ -26,7 +32,7 @@ func LoadConfig() *Configuration {
once.Do(func() {
// 从文件中读取
config = &Configuration{
SessionTimeout: 1,
SessionTimeout: 60,
}
f, err := os.Open("config.json")
if err != nil {
Expand Down

0 comments on commit cfeded5

Please sign in to comment.