From ef46d2cc64e69e81e0109b0228e104fbc36c8886 Mon Sep 17 00:00:00 2001 From: kaiyuan Date: Wed, 26 Jul 2023 09:44:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20stream=E6=A8=A1=E5=BC=8F=E4=B8=8Bhttp=5F?= =?UTF-8?q?url=E5=8F=AF=E7=95=99=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/config/config.go b/config/config.go index 5017d18..1f83cbb 100644 --- a/config/config.go +++ b/config/config.go @@ -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