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

Enable dynamic setting of Azure OpenAI API version #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pmalarme
Copy link
Owner

@pmalarme pmalarme commented May 17, 2024

Implements dynamic setting and retrieval of the Azure OpenAI API version in the backend.

  • Introduces two new Flask routes:
    • Adds a GET route /api/version to return the current Azure OpenAI API version.
    • Adds a POST route /api/version to update the Azure OpenAI API version based on the request body. This change allows the API version to be dynamically set and retrieved, enhancing flexibility and control over the API version used.
  • Environment variable handling:
    • Modifies the initialization of openai.api_version to fetch the version from the OPENAI_API_VERSION environment variable, with a default fallback to '2023-03-15-preview' if the environment variable is not set. This ensures that the API version can be configured externally and dynamically.

For more details, open the Copilot Workspace session.

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