mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: [BREAKING] Remove deprecated Python OpenAI/Azure AI surfaces (#4990)
* [BREAKING] Remove deprecated Python OpenAI/Azure AI surfaces Also clean up follow-on docs, environment guidance, package metadata, and lab test stability. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix deleted semantic-kernel sample links Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR review feedback Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * improve foundry language * Fix A2A Foundry sample regression Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
a5eacbbe65
commit
3a49b1d6dd
+3
-3
@@ -36,11 +36,11 @@ async def run_semantic_kernel() -> None:
|
||||
|
||||
async def run_agent_framework() -> None:
|
||||
from agent_framework import Agent
|
||||
from agent_framework.openai import OpenAIResponsesClient
|
||||
from agent_framework.openai import OpenAIChatClient
|
||||
|
||||
# AF Agent can swap in an OpenAIResponsesClient directly.
|
||||
# AF Agent can swap in an OpenAIChatClient directly.
|
||||
chat_agent = Agent(
|
||||
client=OpenAIResponsesClient(),
|
||||
client=OpenAIChatClient(),
|
||||
instructions="Answer in one concise sentence.",
|
||||
name="Expert",
|
||||
)
|
||||
|
||||
+2
-2
@@ -43,14 +43,14 @@ async def run_semantic_kernel() -> None:
|
||||
|
||||
async def run_agent_framework() -> None:
|
||||
from agent_framework import Agent, tool
|
||||
from agent_framework.openai import OpenAIResponsesClient
|
||||
from agent_framework.openai import OpenAIChatClient
|
||||
|
||||
@tool(name="add", description="Add two numbers")
|
||||
async def add(a: float, b: float) -> float:
|
||||
return a + b
|
||||
|
||||
chat_agent = Agent(
|
||||
client=OpenAIResponsesClient(),
|
||||
client=OpenAIChatClient(),
|
||||
instructions="Use the add tool when math is required.",
|
||||
name="MathExpert",
|
||||
# AF registers the async function as a tool at construction.
|
||||
|
||||
+2
-2
@@ -46,10 +46,10 @@ async def run_semantic_kernel() -> None:
|
||||
|
||||
async def run_agent_framework() -> None:
|
||||
from agent_framework import Agent
|
||||
from agent_framework.openai import OpenAIResponsesClient
|
||||
from agent_framework.openai import OpenAIChatClient
|
||||
|
||||
chat_agent = Agent(
|
||||
client=OpenAIResponsesClient(),
|
||||
client=OpenAIChatClient(),
|
||||
instructions="Return launch briefs as structured JSON.",
|
||||
name="ProductMarketer",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user