mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
test: use public API for streaming structured output
Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/f62076ef-558d-49e8-8fe2-f38d527c9639 Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
5d43f48a9d
commit
6d6b35d8b3
@@ -619,6 +619,9 @@ class RawOpenAIChatClient( # type: ignore[misc]
|
||||
response_format: Any | None = None
|
||||
|
||||
def _finalize_with_captured_format(updates: Sequence[ChatResponseUpdate]) -> ChatResponse[Any]:
|
||||
# ResponseStream only calls the finalizer after iterating or draining `_stream()`,
|
||||
# so `response_format` has already been populated from the validated request state
|
||||
# unless request setup failed before streaming began.
|
||||
return self._finalize_response_updates(updates, response_format=response_format)
|
||||
|
||||
async def _stream() -> AsyncIterable[ChatResponseUpdate]:
|
||||
|
||||
Reference in New Issue
Block a user