Documentation ¶
Index ¶
Constants ¶
View Source
const (
Name = "Morrigan"
)
consts
Variables ¶
View Source
var ( // Current 当前配置 Current = new(Config) )
Functions ¶
Types ¶
type Config ¶
type Config struct { Name string `ignored:"true"` Version string `ignored:"true"` PgStoreDSN string `envconfig:"PG_STORE_DSN" default:"postgres://morrigan@localhost/morrigan?sslmode=disable"` PgTSConfig string `envconfig:"PG_TS_CONFIG"` PgQueryDebug bool `envconfig:"PG_QUERY_DEBUG"` DbAutoInit bool `envconfig:"DB_AUTO_INIT"` SentryDSN string `envconfig:"SENTRY_DSN" ` HTTPListen string `envconfig:"HTTP_LISTEN" default:":5001" required:"true"` RedisURI string `envconfig:"redis_uri" default:"redis://localhost:6379/1" required:"true"` AllowOrigins []string `envconfig:"allow_origins" default:"*" desc:"cors"` // CORS: 允许的 Origin 调用来源 AuthRequired bool `envconfig:"Auth_Required"` AuthSecret string `envconfig:"Auth_Secret" desc:"for chatgpt-web session only"` CookieName string `envconfig:"Cookie_Name" default:"oaic" desc:"for oauth client"` CookiePath string `envconfig:"Cookie_Path" default:"/" desc:"for oauth client"` CookieDomain string `envconfig:"Cookie_Domain" desc:"for oauth client"` CookieMaxAge int `envconfig:"Cookie_MaxAge" desc:"for oauth client"` OpenAIAPIKey string `envconfig:"openAi_Api_Key" required:"true"` ChatModel string `envconfig:"CHAT_MODEL" required:"true" default:"gpt-3.5-turbo"` PresetFile string `envconfig:"preset_file" desc:"custom welcome and messages"` QAEmbedding bool `envconfig:"QA_Embedding" desc:"enable embed QA into prompt"` QAChatLog bool `envconfig:"QA_chat_log"` QAFallback bool `envconfig:"QA_Fallback"` AskRateLimit string `envconfig:"Ask_Rate_Limit" default:"30-H"` }
Config ...
Click to show internal directories.
Click to hide internal directories.