From 7a3ad2afbc014c3173f6c01060768c66b0af7e59 Mon Sep 17 00:00:00 2001 From: Lex Lim Date: Wed, 12 Jul 2023 13:32:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=BF=E5=85=8Dwebsocket=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=97=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/openai_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/openai_api.py b/service/openai_api.py index 89bdba3..ebd9b4a 100644 --- a/service/openai_api.py +++ b/service/openai_api.py @@ -93,7 +93,6 @@ class OpenAIApi: else: post_data["model"] = "text-embedding-ada-002" - if self.api_type == "azure": # Azure api does not support batch for index, text in enumerate(text_list): @@ -156,6 +155,7 @@ class OpenAIApi: token_usage = int(data["usage"]["total_tokens"]) + if on_index_progress is not None: await on_index_progress(index, len(text_list)) return (doc_list, token_usage)