Python: Azure chat client (#185)

* updated openai, fcc works, with sample

* reduced files in openai

* Add azure chat client

* fix tests

* Update python/packages/main/tests/unit/test_openai_chat_completion_base.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/packages/azure/agent_framework/azure/__init__.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/packages/azure/agent_framework/azure/_azure_openai_settings.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* PR comments

* fix bad merge

* disable tests for now

* actually disable tests for azure

* fix tests, align test files with merge changes

* update code for new project structure

* PR comments

* add streaming integration tests. Fix flakiness

---------

Co-authored-by: eavanvalkenburg <github@vanvalkenburg.eu>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
peterychang
2025-07-15 14:38:09 -04:00
committed by GitHub
Unverified
parent fa96f74ee9
commit f0dc661c3e
22 changed files with 2162 additions and 33 deletions
@@ -112,7 +112,14 @@ def _tool_call_non_streaming(func: TInnerGetResponse) -> TInnerGetResponse:
for attempt_idx in range(getattr(self, "__maximum_iterations_per_request", 10)):
response = await func(self, messages=messages, chat_options=chat_options)
# if there are function calls, we will handle them first
function_calls = [it for it in response.messages[0].contents if isinstance(it, FunctionCallContent)]
function_results = {
it.call_id for it in response.messages[0].contents if isinstance(it, FunctionResultContent)
}
function_calls = [
it
for it in response.messages[0].contents
if isinstance(it, FunctionCallContent) and it.call_id not in function_results
]
if function_calls:
# Run all function calls concurrently
results = await asyncio.gather(*[