-
Notifications
You must be signed in to change notification settings - Fork 3k
New Python Agents SDK #40633
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
base: main
Are you sure you want to change the base?
New Python Agents SDK #40633
Conversation
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.
Pull Request Overview
This PR introduces the new Python Agents SDK for Azure AI Agents with both asynchronous and synchronous clients, along with configuration, type definitions, and helper modules. It also adds documentation for the FunctionTool for defining and invoking functions in agents.
- Added aio and sync client implementations.
- Introduced new configuration, types, and vendor modules.
- Provided documentation and examples with FunctionTool and updated version information.
Reviewed Changes
Copilot reviewed 143 out of 146 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
sdk/ai/azure-ai-agents/azure/ai/agents/aio/_operations/init.py | Initialization for async operations module. |
sdk/ai/azure-ai-agents/azure/ai/agents/aio/_configuration.py | New configuration class for async client. |
sdk/ai/azure-ai-agents/azure/ai/agents/aio/_client.py | Added asynchronous client; potential endpoint bug. |
sdk/ai/azure-ai-agents/azure/ai/agents/aio/init.py | Updated async module initialization. |
sdk/ai/azure-ai-agents/azure/ai/agents/_version.py | Version constant added. |
sdk/ai/azure-ai-agents/azure/ai/agents/_vendor.py | Added vendor helpers and types. |
sdk/ai/azure-ai-agents/azure/ai/agents/_types.py | New type definitions. |
sdk/ai/azure-ai-agents/azure/ai/agents/_operations/_patch.py | Patch module for SDK customizations. |
sdk/ai/azure-ai-agents/azure/ai/agents/_operations/init.py | Initialization for sync operations module. |
sdk/ai/azure-ai-agents/azure/ai/agents/_configuration.py | New configuration class for sync client. |
sdk/ai/azure-ai-agents/azure/ai/agents/_client.py | Added synchronous client; potential endpoint bug. |
sdk/ai/azure-ai-agents/azure/ai/agents/init.py | Package initialization and version exposure. |
sdk/ai/azure-ai-agents/azure/ai/init.py | Package path extension. |
sdk/ai/azure-ai-agents/azure/init.py | Package path extension. |
sdk/ai/azure-ai-agents/LICENSE | License file added. |
sdk/ai/azure-ai-agents/FunctionTool.md | Documentation for using FunctionTool. |
sdk/ai/azure-ai-agents/CHANGELOG.md | Initial changelog with release notes. |
Files not reviewed (3)
- sdk/ai/azure-ai-agents/MANIFEST.in: Language not supported
- sdk/ai/azure-ai-agents/apiview-properties.json: Language not supported
- sdk/ai/azure-ai-agents/assets.json: Language not supported
Comments suppressed due to low confidence (1)
sdk/ai/azure-ai-agents/FunctionTool.md:20
- The sample function 'fetch_weather' uses json.dumps without importing the json module. Consider adding 'import json' at the beginning of the code snippet to ensure the example runs as intended.
weather_json = json.dumps({"weather": weather})
def __init__( | ||
self, endpoint: str, credential: Union[AzureKeyCredential, "AsyncTokenCredential"], **kwargs: Any | ||
) -> None: | ||
_endpoint = "{endpoint}" |
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.
The base URL is set to the literal string '{endpoint}' instead of using the actual endpoint value. Consider using the provided endpoint parameter (for example, by directly using endpoint or formatting it as an f-string: f"{endpoint}").
_endpoint = "{endpoint}" | |
_endpoint = endpoint |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
""" | ||
|
||
def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCredential"], **kwargs: Any) -> None: | ||
_endpoint = "{endpoint}" |
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.
The synchronous client is also setting _endpoint to the literal string '{endpoint}'. It should use the actual endpoint value provided, for example via f-string formatting or directly assigning endpoint.
_endpoint = "{endpoint}" | |
_endpoint = endpoint |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
API change check APIView has identified API level changes in this PR and created following API reviews. |
No description provided.