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
@@ -4,7 +4,6 @@ import asyncio
from random import randint
from typing import Annotated
from agent_framework import ChatClientAgent
from agent_framework.openai import OpenAIAssistantsClient
from pydantic import Field
@@ -23,8 +22,7 @@ async def non_streaming_example() -> None:
# Since no assistant ID is provided, the assistant will be automatically created
# and deleted after getting a response
async with ChatClientAgent(
chat_client=OpenAIAssistantsClient(),
async with OpenAIAssistantsClient().create_agent(
instructions="You are a helpful weather agent.",
tools=get_weather,
) as agent:
@@ -40,8 +38,7 @@ async def streaming_example() -> None:
# Since no assistant ID is provided, the assistant will be automatically created
# and deleted after getting a response
async with ChatClientAgent(
chat_client=OpenAIAssistantsClient(),
async with OpenAIAssistantsClient().create_agent(
instructions="You are a helpful weather agent.",
tools=get_weather,
) as agent: