Python: openai updates (#388)

* openai updates

* rebuild of openai structure

* updated responses structure

* renamed sample

* added file id support to code interpreter

* added hosted file ids to code interpretor

* mypy fixes

* removed default az cred from codebase

* updated agent name setup

* added kwargs to entra methods

* and further kwargs

* extra comment

* updated all samples

* readded custom get methods for responses

* updated int tests with ad credential

* missed one
This commit is contained in:
Eduard van Valkenburg
2025-08-12 08:14:22 +02:00
committed by GitHub
Unverified
parent 19676978e9
commit df9d85d1f0
53 changed files with 1668 additions and 1470 deletions
@@ -5,6 +5,7 @@ from random import randint
from typing import Annotated
from agent_framework.foundry import FoundryChatClient
from azure.identity.aio import DefaultAzureCredential
from pydantic import Field
@@ -22,7 +23,7 @@ async def non_streaming_example() -> None:
# Since no Agent ID is provided, the agent will be automatically created
# and deleted after getting a response
async with FoundryChatClient().create_agent(
async with FoundryChatClient(async_ad_credential=DefaultAzureCredential()).create_agent(
name="WeatherAgent",
instructions="You are a helpful weather agent.",
tools=get_weather,
@@ -39,7 +40,7 @@ async def streaming_example() -> None:
# Since no Agent ID is provided, the agent will be automatically created
# and deleted after getting a response
async with FoundryChatClient().create_agent(
async with FoundryChatClient(async_ad_credential=DefaultAzureCredential()).create_agent(
name="WeatherAgent",
instructions="You are a helpful weather agent.",
tools=get_weather,