From 9df27267bb3ffcd0e0f209c45762868ac76bfcb0 Mon Sep 17 00:00:00 2001 From: jekalmin Date: Mon, 11 Dec 2023 22:18:44 +0900 Subject: [PATCH] explicitly set response_format to "text" --- custom_components/extended_openai_conversation/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/extended_openai_conversation/__init__.py b/custom_components/extended_openai_conversation/__init__.py index 7e9c9fc..425d54e 100644 --- a/custom_components/extended_openai_conversation/__init__.py +++ b/custom_components/extended_openai_conversation/__init__.py @@ -265,6 +265,7 @@ async def query( DEFAULT_MAX_FUNCTION_CALLS_PER_CONVERSATION, ): function_call = "none" + response_format = {"type": "text"} _LOGGER.info("Prompt for %s: %s", model, messages) @@ -279,6 +280,7 @@ async def query( user=user_input.conversation_id, functions=functions, function_call=function_call, + response_format=response_format, ) _LOGGER.info("Response %s", response)