fix: bug fixing for #1455 - not able to serialize json for Azure (#1495)

Co-authored-by: cpacker <packercharles@gmail.com>
This commit is contained in:
Kimi
2024-07-04 14:57:49 -07:00
committed by GitHub
parent 8b13d195ce
commit 8cb69964d2

View File

@@ -231,7 +231,7 @@ def create(
data = dict(
# NOTE: don't pass model to Azure calls, that is the deployment_id
# model=agent_config.model,
messages=messages,
messages=[m.to_openai_dict() for m in messages],
tools=[{"type": "function", "function": f} for f in functions] if functions else None,
tool_choice=function_call,
user=str(user_id),
@@ -240,7 +240,7 @@ def create(
data = dict(
# NOTE: don't pass model to Azure calls, that is the deployment_id
# model=agent_config.model,
messages=messages,
messages=[m.to_openai_dict() for m in messages],
functions=functions,
function_call=function_call,
user=str(user_id),