-
Notifications
You must be signed in to change notification settings - Fork 107
Upgrade agent-framework to latest RC #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
340c6c9
295594e
d3bee3b
aba73a6
c83e234
0715ff2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,10 +2,9 @@ | |||||||||||
| import logging | ||||||||||||
| import os | ||||||||||||
|
|
||||||||||||
| from agent_framework import ChatAgent, MCPStreamableHTTPTool | ||||||||||||
| from agent_framework.azure import AzureOpenAIChatClient | ||||||||||||
| from agent_framework import Agent, MCPStreamableHTTPTool | ||||||||||||
| from agent_framework.openai import OpenAIChatClient | ||||||||||||
| from azure.identity import DefaultAzureCredential | ||||||||||||
| from azure.identity.aio import DefaultAzureCredential, get_bearer_token_provider | ||||||||||||
| from dotenv import load_dotenv | ||||||||||||
| from rich import print | ||||||||||||
| from rich.logging import RichHandler | ||||||||||||
|
|
@@ -20,18 +19,20 @@ | |||||||||||
|
|
||||||||||||
| # Configure chat client based on API_HOST | ||||||||||||
| API_HOST = os.getenv("API_HOST", "github") | ||||||||||||
| async_credential = None | ||||||||||||
| if API_HOST == "azure": | ||||||||||||
| client = AzureOpenAIChatClient( | ||||||||||||
| credential=DefaultAzureCredential(), | ||||||||||||
| deployment_name=os.environ.get("AZURE_OPENAI_CHAT_DEPLOYMENT"), | ||||||||||||
| endpoint=os.environ.get("AZURE_OPENAI_ENDPOINT"), | ||||||||||||
| api_version=os.environ.get("AZURE_OPENAI_VERSION"), | ||||||||||||
| async_credential = DefaultAzureCredential() | ||||||||||||
| token_provider = get_bearer_token_provider(async_credential, "https://cognitiveservices.azure.com/.default") | ||||||||||||
| client = OpenAIChatClient( | ||||||||||||
| base_url=f"{os.environ['AZURE_OPENAI_ENDPOINT']}/openai/v1/", | ||||||||||||
|
Comment on lines
+26
to
+27
|
||||||||||||
| client = OpenAIChatClient( | |
| base_url=f"{os.environ['AZURE_OPENAI_ENDPOINT']}/openai/v1/", | |
| azure_endpoint = os.environ["AZURE_OPENAI_ENDPOINT"].rstrip("/") | |
| client = OpenAIChatClient( | |
| base_url=f"{azure_endpoint}/openai/v1/", |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,7 +16,7 @@ dependencies = [ | |||||
| "langchain-openai>=1.0.1", | ||||||
| "langchain-mcp-adapters>=0.1.11", | ||||||
| "azure-ai-agents>=1.1.0", | ||||||
| "agent-framework>=1.0.0b251016", | ||||||
| "agent-framework>=1.0.0rc5", | ||||||
|
||||||
| "agent-framework>=1.0.0rc5", | |
| "agent-framework-core>=1.0.0rc5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AZURE_OPENAI_ENDPOINTin.env-sampleends with a trailing slash, so buildingbase_urlasf"{os.environ['AZURE_OPENAI_ENDPOINT']}/openai/v1/"produces a double-slash (...azure.com//openai/v1/). This can break request routing in some HTTP stacks. Consider normalizing the endpoint first (e.g.,rstrip('/')) before appending the path.