mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Updated azure-ai-projects package version and small fixes (#2139)
This commit is contained in:
committed by
GitHub
Unverified
parent
f309a2818b
commit
693d5c941d
@@ -305,7 +305,7 @@ class AzureAIClient(OpenAIBaseResponsesClient):
|
||||
|
||||
return run_options
|
||||
|
||||
async def initialize_client(self):
|
||||
async def initialize_client(self) -> None:
|
||||
"""Initialize OpenAI client asynchronously."""
|
||||
self.client = await self.project_client.get_openai_client() # type: ignore
|
||||
|
||||
@@ -322,11 +322,7 @@ class AzureAIClient(OpenAIBaseResponsesClient):
|
||||
|
||||
def get_mcp_tool(self, tool: HostedMCPTool) -> MutableMapping[str, Any]:
|
||||
"""Get MCP tool from HostedMCPTool."""
|
||||
mcp: MCPTool = {
|
||||
"type": "mcp",
|
||||
"server_label": tool.name.replace(" ", "_"),
|
||||
"server_url": str(tool.url),
|
||||
}
|
||||
mcp = MCPTool(server_label=tool.name.replace(" ", "_"), server_url=str(tool.url))
|
||||
|
||||
if tool.allowed_tools:
|
||||
mcp["allowed_tools"] = list(tool.allowed_tools)
|
||||
|
||||
@@ -24,7 +24,7 @@ classifiers = [
|
||||
]
|
||||
dependencies = [
|
||||
"agent-framework-core",
|
||||
"azure-ai-projects >= 2.0.0a20251110001",
|
||||
"azure-ai-projects == 2.0.0b1",
|
||||
"azure-ai-agents == 1.2.0b5",
|
||||
"aiohttp",
|
||||
]
|
||||
@@ -86,6 +86,3 @@ test = "pytest --cov=agent_framework_azure_ai --cov-report=term-missing:skip-cov
|
||||
[build-system]
|
||||
requires = ["flit-core >= 3.11,<4.0"]
|
||||
build-backend = "flit_core.buildapi"
|
||||
|
||||
[tool.uv.sources]
|
||||
azure-ai-projects = { index = "azure-sdk-for-python" }
|
||||
@@ -162,7 +162,7 @@ class OpenAIBase(SerializationMixin):
|
||||
for key, value in kwargs.items():
|
||||
setattr(self, key, value)
|
||||
|
||||
async def initialize_client(self):
|
||||
async def initialize_client(self) -> None:
|
||||
"""Initialize OpenAI client asynchronously.
|
||||
|
||||
Override in subclasses to initialize the OpenAI client asynchronously.
|
||||
|
||||
Reference in New Issue
Block a user