-
Notifications
You must be signed in to change notification settings - Fork 3k
Push updates from the latest typespec #40616
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?
Conversation
* Use 1DP endpoint * Add more config * Fix linters * Fix linters * Fix spelling * Add package to the build, so we can use private feed * Fix samples and readme * Fix readme-s and spelling * Make back compatible * Fixes * Fix linters and record the tests --------- Co-authored-by: Darren Cohen <[email protected]>
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 pull request updates the SDK based on the latest typespec, introducing new client implementations (both asynchronous and synchronous), updating configuration and type definitions, and refreshing ancillary package files.
- Added asynchronous and synchronous client implementations with updated request handling
- Introduced new configuration, types, version, and vendor files
- Updated package initialization and documentation for tests and licensing
Reviewed Changes
Copilot reviewed 147 out of 152 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
sdk/ai/azure-ai-assistants/azure/ai/assistants/aio/_client.py | Introduces the async client with endpoint formatting and policy setup |
sdk/ai/azure-ai-assistants/azure/ai/assistants/init.py | Sets up package export and versioning |
sdk/ai/azure-ai-assistants/azure/ai/assistants/_client.py | Provides the synchronous client with similar functionalities |
sdk/ai/azure-ai-assistants/azure/ai/assistants/_types.py | Defines type unions used across the SDK |
Other files | Include configuration, vendor, patch, version, changelog, and packaging changes to support the updated typespec |
Files not reviewed (5)
- .vscode/cspell.json: Language not supported
- pylintrc: Language not supported
- sdk/ai/azure-ai-assistants/MANIFEST.in: Language not supported
- sdk/ai/azure-ai-assistants/apiview-properties.json: Language not supported
- sdk/ai/azure-ai-assistants/assets.json: Language not supported
Comments suppressed due to low confidence (1)
sdk/ai/azure-ai-assistants/azure/ai/assistants/_types.py:13
- [nitpick] The union type definition includes duplicate 'str' entries; removing the redundancy will improve clarity.
AssistantsApiResponseFormatOption = Union[
str,
str,
"_models.AssistantsApiResponseFormatMode",
"_models.AssistantsApiResponseFormat",
"_models.ResponseFormatJsonSchemaType",
]
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 endpoint formatting is incorrect since the literal "{endpoint}" is used. Consider using an f-string (e.g., f"{endpoint}") or directly passing the endpoint variable.
_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.
In the synchronous client, the endpoint placeholder is hard-coded and does not interpolate the actual value. Use an f-string or the endpoint parameter directly to ensure proper URL formation.
_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. |
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines