forked from diemus/azure-openai-proxy
-
Notifications
You must be signed in to change notification settings - Fork 5
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
1.0.1 #10
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added get Deployed models in Azure (DeployedModel and ListDeployedModelsResponse) Added JSON mode requests and responses (JSONModeRequest, JSONModeResponse, ResponseFormat, etc.) Added more detailed deployment information (DeploymentDetails, DeploymentCapability, ScaleSettings) Added ImageGenerationRequest and ImageGenerationResponse: Added AudioTranscriptionRequest and AudioTranscriptionResponse
This commit adds the functionality to fetch deployed models in Azure. It includes the implementation of the `fetchDeployedModels` function, which makes a GET request to the Azure OpenAI API to retrieve the list of deployed models. The fetched models are then returned as a JSON response. The `handleGetModels` function has been updated to use the `fetchDeployedModels` function and return the fetched models as a response. This feature allows users to retrieve information about the deployed models in Azure, enabling a more consistent experience to the openai api in open web-ui.
Added imports: encoding/json, fmt, io, and time. Replaced the hardcoded handleGetModels function with one that calls fetchDeployedModels(). Implemented the fetchDeployedModels() function to dynamically fetch and process the deployed models. Updated the error handling in fetchDeployedModels() to use io.ReadAll instead of the deprecated ioutil.ReadAll. Added time parsing for the CreatedAt field, converting it to a Unix timestamp.
This commit updates the authorization header handling in the fetchDeployedModels function. It sets the "Authorization" header of the request to the value of the "Authorization" header from the original request. This ensures that the authorization token is preserved when making the request to fetch deployed models. The code changes in this commit modify the main.go and pkg/azure/proxy.go files.
To-Do: Only list deployed models instead of all available.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.