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

1.0.1 #10

Merged
merged 14 commits into from
Jun 22, 2024
Merged

1.0.1 #10

merged 14 commits into from
Jun 22, 2024

Conversation

Gyarbij
Copy link
Owner

@Gyarbij Gyarbij commented Jun 22, 2024

No description provided.

Gyarbij added 14 commits June 22, 2024 22:09
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.
@Gyarbij Gyarbij merged commit b4ea203 into stable Jun 22, 2024
4 checks passed
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