From 1fd5116f1ac306c8a4fe0dba25466b54c6e3e202 Mon Sep 17 00:00:00 2001 From: KyrianC Date: Tue, 12 Dec 2023 11:57:06 +0100 Subject: [PATCH] [fix] don't handle empty chunks in stream response --- edenai_apis/apis/openai/openai_text_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edenai_apis/apis/openai/openai_text_api.py b/edenai_apis/apis/openai/openai_text_api.py index 3b2b578a..32f19d81 100644 --- a/edenai_apis/apis/openai/openai_text_api.py +++ b/edenai_apis/apis/openai/openai_text_api.py @@ -774,7 +774,7 @@ def text__chat( in (None, "stop"), provider="openai", ) - for chunk in response + for chunk in response if chunk ) return ResponseType[StreamChat](