mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
fix chat_options in kwargs error path in responses client (#483)
This commit is contained in:
committed by
GitHub
Unverified
parent
32c26c3c25
commit
7942a52ca1
@@ -166,7 +166,8 @@ class OpenAIResponsesClientBase(OpenAIHandler, ChatClientBase):
|
||||
)
|
||||
)
|
||||
|
||||
chat_options = ChatOptions(
|
||||
return await super().get_response(
|
||||
messages=messages,
|
||||
max_tokens=max_tokens,
|
||||
response_format=response_format,
|
||||
seed=seed,
|
||||
@@ -177,11 +178,6 @@ class OpenAIResponsesClientBase(OpenAIHandler, ChatClientBase):
|
||||
top_p=top_p,
|
||||
user=user,
|
||||
additional_properties=additional_properties,
|
||||
)
|
||||
|
||||
return await super().get_response(
|
||||
messages=messages,
|
||||
chat_options=chat_options,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@@ -262,7 +258,8 @@ class OpenAIResponsesClientBase(OpenAIHandler, ChatClientBase):
|
||||
)
|
||||
)
|
||||
|
||||
chat_options = ChatOptions(
|
||||
async for update in super().get_streaming_response(
|
||||
messages=messages,
|
||||
max_tokens=max_tokens,
|
||||
response_format=response_format,
|
||||
seed=seed,
|
||||
@@ -273,11 +270,6 @@ class OpenAIResponsesClientBase(OpenAIHandler, ChatClientBase):
|
||||
top_p=top_p,
|
||||
user=user,
|
||||
additional_properties=additional_properties,
|
||||
)
|
||||
|
||||
async for update in super().get_streaming_response(
|
||||
messages=messages,
|
||||
chat_options=chat_options,
|
||||
**kwargs,
|
||||
):
|
||||
yield update
|
||||
|
||||
Reference in New Issue
Block a user