Skip to content

Commit

Permalink
fix: stream模式下http_url可留空 (#280)
Browse files Browse the repository at this point in the history
Co-authored-by: kaiyuan <kaiyuan@jingling.group>
  • Loading branch information
eryajf and kaiyuan authored Jul 26, 2023
1 parent 08f46f3 commit 24d40ab
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,10 @@ func LoadConfig() *Configuration {
if config.ChatType == "" {
config.ChatType = "0"
}
if config.ApiKey == "" {
logger.Fatal("config err: api key required")
}
if config.ServiceURL == "" {
logger.Fatal("config err: service url required")
if !config.AzureOn {
if config.ApiKey == "" {
panic("config err: api key required")
}
}
if config.MaxQuestionLen == 0 {
config.MaxQuestionLen = 4096
Expand Down

0 comments on commit 24d40ab

Please sign in to comment.