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
@@ -30,7 +30,7 @@ Durable execution support for long-running agent workflows using Azure Durable F
|
||||
|
||||
```python
|
||||
from agent_framework import Agent
|
||||
from agent_framework.azure import AzureOpenAIChatClient
|
||||
from agent_framework.openai import OpenAIChatCompletionClient
|
||||
from agent_framework_durabletask import DurableAIAgentClient, DurableAIAgentWorker
|
||||
from durabletask.client import TaskHubGrpcClient
|
||||
from durabletask.worker import TaskHubGrpcWorker
|
||||
@@ -45,7 +45,7 @@ dt_worker = TaskHubGrpcWorker(host_address="localhost:4001")
|
||||
agent_worker = DurableAIAgentWorker(dt_worker)
|
||||
|
||||
# Create a chat client for the agent
|
||||
chat_client = AzureOpenAIChatClient()
|
||||
chat_client = OpenAIChatCompletionClient()
|
||||
my_agent = Agent(client=chat_client, name="assistant")
|
||||
agent_worker.add_agent(my_agent)
|
||||
```
|
||||
|
||||
@@ -16,7 +16,7 @@ The durable task integration lets you host Microsoft Agent Framework agents usin
|
||||
|
||||
```python
|
||||
from agent_framework import Agent
|
||||
from agent_framework.azure import AzureOpenAIChatClient
|
||||
from agent_framework.openai import OpenAIChatCompletionClient
|
||||
from agent_framework_durabletask import DurableAIAgentWorker
|
||||
from durabletask.worker import TaskHubGrpcWorker
|
||||
|
||||
@@ -24,7 +24,7 @@ from durabletask.worker import TaskHubGrpcWorker
|
||||
worker = TaskHubGrpcWorker(host_address="localhost:4001")
|
||||
agent_worker = DurableAIAgentWorker(worker)
|
||||
|
||||
chat_client = AzureOpenAIChatClient()
|
||||
chat_client = OpenAIChatCompletionClient()
|
||||
my_agent = Agent(client=chat_client, name="assistant")
|
||||
agent_worker.add_agent(my_agent)
|
||||
```
|
||||
|
||||
@@ -31,7 +31,7 @@ class DurableAIAgentWorker:
|
||||
```python
|
||||
from durabletask.worker import TaskHubGrpcWorker
|
||||
from agent_framework import Agent
|
||||
from agent_framework.azure import AzureOpenAIChatClient
|
||||
from agent_framework.openai import OpenAIChatCompletionClient
|
||||
from agent_framework_durabletask import DurableAIAgentWorker
|
||||
|
||||
# Create the underlying worker
|
||||
@@ -41,7 +41,7 @@ class DurableAIAgentWorker:
|
||||
agent_worker = DurableAIAgentWorker(worker)
|
||||
|
||||
# Register agents
|
||||
client = AzureOpenAIChatClient()
|
||||
client = OpenAIChatCompletionClient()
|
||||
my_agent = Agent(client=client, name="assistant")
|
||||
agent_worker.add_agent(my_agent)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Azure OpenAI Configuration
|
||||
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
|
||||
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME=your-deployment-name
|
||||
AZURE_OPENAI_DEPLOYMENT_NAME=your-deployment-name
|
||||
# Optional: Use Azure CLI authentication if not provided
|
||||
# AZURE_OPENAI_API_KEY=your-api-key
|
||||
|
||||
|
||||
Reference in New Issue
Block a user