From 24d40aba485251802a30c84d565253a8f2e46989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E4=B8=AB=E8=AE=B2=E6=A2=B5?= Date: Wed, 26 Jul 2023 09:47:44 +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=20(#280)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: kaiyuan --- config/config.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/config/config.go b/config/config.go index 5017d187..1f83cbbf 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