支持GPT4和自定义GPT模型

This commit is contained in:
cookeem
2023-03-22 16:18:38 +08:00
parent cd58d80be9
commit 086bfb3ce9
10 changed files with 239 additions and 106 deletions

View File

@@ -1,9 +1,10 @@
package chat
type Config struct {
AppKey string `yaml:"appKey" json:"appKey" bson:"appKey" validate:"required"`
ApiKey string `yaml:"apiKey" json:"apiKey" bson:"apiKey" validate:"required"`
Port int `yaml:"port" json:"port" bson:"port" validate:"required"`
IntervalSeconds int `yaml:"intervalSeconds" json:"intervalSeconds" bson:"intervalSeconds" validate:"required"`
Model string `yaml:"model" json:"model" bson:"model" validate:"required"`
MaxLength int `yaml:"maxLength" json:"maxLength" bson:"maxLength" validate:"required"`
Cors bool `yaml:"cors" json:"cors" bson:"cors" validate:""`
}