{"id":19100328,"url":"https://github.com/aliencube/azure-openai-sdk-proxy","last_synced_at":"2025-04-11T22:20:40.973Z","repository":{"id":230513002,"uuid":"719924688","full_name":"aliencube/azure-openai-sdk-proxy","owner":"aliencube","description":"This provides a proxy server application of Azure OpenAI Service API that round-robins multiple Azure OpenAI Service instances.","archived":false,"fork":false,"pushed_at":"2024-11-09T09:36:03.000Z","size":374,"stargazers_count":13,"open_issues_count":72,"forks_count":18,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T06:03:52.425Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aliencube.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-17T07:38:13.000Z","updated_at":"2024-11-09T09:36:06.000Z","dependencies_parsed_at":"2024-03-30T06:41:00.250Z","dependency_job_id":"519bf37a-c17e-436e-b9a0-2c66b827b4c2","html_url":"https://github.com/aliencube/azure-openai-sdk-proxy","commit_stats":null,"previous_names":["aliencube/azure-openai-sdk-proxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliencube%2Fazure-openai-sdk-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliencube%2Fazure-openai-sdk-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliencube%2Fazure-openai-sdk-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliencube%2Fazure-openai-sdk-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aliencube","download_url":"https://codeload.github.com/aliencube/azure-openai-sdk-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487667,"owners_count":21112191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T03:52:46.469Z","updated_at":"2025-04-11T22:20:40.933Z","avatar_url":"https://github.com/aliencube.png","language":"C#","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"# Azure OpenAI Service Proxy\r\n\r\nThis provides a proxy server application of Azure OpenAI Service API that round-robins multiple Azure OpenAI Service instances.\r\n\r\n## Prerequisites\r\n\r\n- [Azure Subscription](https://azure.microsoft.com/free)\r\n- [Azure OpenAI Subscription](https://aka.ms/oai/access)\r\n- [.NET SDK 8.0.300+](https://dotnet.microsoft.com/download/dotnet/8.0) + [Aspire workload](https://learn.microsoft.com/dotnet/aspire/fundamentals/setup-tooling)\r\n- [Visual Studio 2022 17.10+](https://visualstudio.microsoft.com/vs/) or [Visual Studio Code](https://code.visualstudio.com/) + [C# DevKit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit)\r\n- [Docker Desktop](https://docs.docker.com/desktop/) or [Podman](https://podman.io/docs/installation)\r\n- [PowerShell 7.4+](https://learn.microsoft.com/powershell/scripting/install/installing-powershell)\r\n- [Azure Developer CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd)\r\n- [Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli) + [Container Apps extension](https://learn.microsoft.com/cli/azure/azure-cli-extensions-overview)\r\n- [GitHub CLI](https://cli.github.com/)\r\n\r\n## Getting Started\r\n\r\n1. Login to Azure and GitHub.\r\n\r\n    ```bash\r\n    # Login to Azure Dev CLI\r\n    azd auth login\r\n    \r\n    # Login to Azure CLI\r\n    az login\r\n    \r\n    # Login to GitHub\r\n    gh auth login\r\n    ```\r\n\r\n1. Check login status.\r\n\r\n    ```bash\r\n    # Azure Dev CLI\r\n    azd auth login --check-status\r\n    \r\n    # Azure CLI\r\n    az account show\r\n    \r\n    # GitHub CLI\r\n    gh auth status\r\n    ```\r\n\r\n1. Fork this repository to your account and clone the forked repository to your local machine.\r\n\r\n    ```bash\r\n    gh repo fork aliencube/azure-openai-sdk-proxy --clone --default-branch-only\r\n    ```\r\n\r\n1. Run the following commands in order to provision and deploy the app.\r\n\r\n    ```bash\r\n    # zsh/bash\r\n    AZURE_ENV_NAME=\"proxy$((RANDOM%9000+1000))\"\r\n    azd init -e $AZURE_ENV_NAME\r\n    azd up\r\n    \r\n    # PowerShell\r\n    $AZURE_ENV_NAME = \"proxy$(Get-Random -Minimum 1000 -Maximum 9999)\"\r\n    azd init -e $AZURE_ENV_NAME\r\n    azd up\r\n    ```\r\n\r\n   \u003e **NOTE**: The `AZURE_ENV_NAME` variable is an arbitrary name for the Azure environment. You can change it to your preferred one.\r\n\r\n1. Run the following command to provision Azure resources that are required for the app.\r\n\r\n    ```bash\r\n    # zsh/bash\r\n    AZURE_RESOURCE_GROUP=\"rg-$AZURE_ENV_NAME\"\r\n    AZURE_LOCATION=$(azd env get-value AZURE_LOCATION)\r\n    az deployment group create \\\r\n        -g $AZURE_RESOURCE_GROUP \\\r\n        --template-file ./infra/aspire.bicep \\\r\n        --parameters environmentName=$AZURE_ENV_NAME \\\r\n        --parameters location=$AZURE_LOCATION\r\n\r\n    # PowerShell\r\n    $AZURE_RESOURCE_GROUP = \"rg-$AZURE_ENV_NAME\"\r\n    $AZURE_LOCATION = azd env get-value AZURE_LOCATION\r\n    az deployment group create `\r\n        -g $AZURE_RESOURCE_GROUP `\r\n        --template-file ./infra/aspire.bicep `\r\n        --parameters environmentName=$AZURE_ENV_NAME `\r\n        --parameters location=$AZURE_LOCATION\r\n    ```\r\n\r\n## Unit Testing \u0026 Integration Testing \u0026 Linting OpenAPI Document\r\n\r\n1. Run the following command to run both unit tests and integration tests at once on your local machine.\r\n\r\n    ```bash\r\n    # zsh/bash\r\n    ./scripts/run-tests.sh -c Debug -k || ./scripts/run-tests.sh -c Debug\r\n\r\n    # PowerShell\r\n    ./scripts/Run-Tests.ps1 -Configuration Debug -KillPorts\r\n    ```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliencube%2Fazure-openai-sdk-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliencube%2Fazure-openai-sdk-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliencube%2Fazure-openai-sdk-proxy/lists"}