Skip to content
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

Make api_version Optional with Default to Latest Inference Version (#1913) #2029

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Programmer-RD-AI
Copy link

@Programmer-RD-AI Programmer-RD-AI commented Jan 18, 2025

This PR addresses the issue #1913 and updates the AzureOpenAI class to make the api_version argument optional. If not provided, it defaults to "2024-12-01-preview", the latest inference version. This change simplifies the usage of the class and ensures compatibility with the most up-to-date API version without requiring explicit user input.

Key Updates:

  • The api_version argument is now optional with a default value of "2024-12-01-preview".
  • The default API version ensures that users are automatically aligned with the latest version of the service.

Considerations:

  • The Literal values for api_version will need to be updated periodically to include newer versions as they become available.
  • The current list of versions was sourced from Microsoft’s API version deprecation documentation.
  • We should monitor and update this list regularly to keep it aligned with the latest available API versions.

This change improves flexibility and ensures that users can work seamlessly with the latest available API version without needing to specify it manually.

…StrategyObject

Updated the type alias for FileChunkingStrategyParam to replace StaticFileChunkingStrategyParam
with StaticFileChunkingStrategyObject to align with the correct API structure and resolve type errors.
- Updated the constructor of the `AzureOpenAI` class to make the `api_version` argument optional.
- If the `api_version` is not provided, it defaults to `"2024-12-01-preview"`, which is the latest inference version.
- This change provides flexibility to the user, allowing them to either specify the API version or rely on the default latest version.
- The default value (`"2024-12-01-preview"`) is now the fallback if no version is passed.

This update improves the user experience by ensuring compatibility with the most recent API version without requiring explicit input from the user.
@Programmer-RD-AI Programmer-RD-AI requested a review from a team as a code owner January 18, 2025 04:49
@Programmer-RD-AI Programmer-RD-AI changed the title Make api_version Optional with Default to Latest Inference Version Make api_version Optional with Default to Latest Inference Version (#1913) Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant