From 4924ee2901ce9ad17259ae817bbb46885d1ba8ba Mon Sep 17 00:00:00 2001 From: Jean-Sylvain Boige Date: Fri, 6 Sep 2024 02:42:23 +0200 Subject: [PATCH] typo in OpenAI response format (#6365) --- extensions/openai/completions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/openai/completions.py b/extensions/openai/completions.py index 362620fa..6bd8f409 100644 --- a/extensions/openai/completions.py +++ b/extensions/openai/completions.py @@ -235,7 +235,7 @@ def chat_completions_common(body: dict, is_legacy: bool = False, stream=False, p raise InvalidRequestError(message="messages: missing content", param='messages') # Chat Completions - object_type = 'chat.completions' if not stream else 'chat.completions.chunk' + object_type = 'chat.completion' if not stream else 'chat.completion.chunk' created_time = int(time.time()) cmpl_id = "chatcmpl-%d" % (int(time.time() * 1000000000)) resp_list = 'data' if is_legacy else 'choices'