Skip to content

Commit

Permalink
explicitly set response_format to "text"
Browse files Browse the repository at this point in the history
  • Loading branch information
jekalmin authored and jekalmin committed Dec 11, 2023
1 parent 4d9f35a commit 9df2726
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/extended_openai_conversation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)
Expand Down

0 comments on commit 9df2726

Please sign in to comment.