From d384be868c1c336f4952f796ae20ce755a1217c6 Mon Sep 17 00:00:00 2001 From: ckt1031 <65409152+ckt1031@users.noreply.github.com> Date: Mon, 4 Sep 2023 15:03:47 +0800 Subject: [PATCH] fix: test --- controller/channel-test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/controller/channel-test.go b/controller/channel-test.go index 365dada0..d5217bb1 100644 --- a/controller/channel-test.go +++ b/controller/channel-test.go @@ -79,9 +79,7 @@ func testChannel(channel *model.Channel, request ChatRequest) (err error, openai return errors.New(fmt.Sprintf("status code %d", resp.StatusCode)), nil } - isStream := strings.HasPrefix(resp.Header.Get("Content-Type"), "text/event-stream") - - if channel.AllowStreaming == common.ChannelAllowStreamEnabled && isStream { + if channel.AllowStreaming == common.ChannelAllowStreamEnabled { responseText := "" scanner := bufio.NewScanner(resp.Body) scanner.Split(func(data []byte, atEOF bool) (advance int, token []byte, err error) {