azure-openai-proxy  by diemus

API proxy for Azure OpenAI, converts OpenAI requests

created 2 years ago
634 stars

Top 53.3% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a proxy for Azure OpenAI API, enabling seamless integration with open-source ChatGPT web projects and overcoming regional access restrictions for OpenAI APIs. It targets developers and users who need to leverage Azure OpenAI services through an OpenAI-compatible interface.

How It Works

The proxy acts as an intermediary, translating incoming OpenAI API requests into Azure OpenAI API requests. It supports all Azure OpenAI APIs, models (including custom fine-tuned ones), and offers custom mapping between Azure deployment names and OpenAI model names. For APIs not supported by Azure, it provides mock responses, ensuring compatibility with client applications.

Quick Start & Requirements

  • Install: docker pull ishadows/azure-openai-proxy:latest
  • Run:
    docker run -d -p 8080:8080 --name=azure-openai-proxy \
      --env AZURE_OPENAI_ENDPOINT={your azure endpoint} \
      --env AZURE_OPENAI_MODEL_MAPPER={your custom model mapper} \
      ishadows/azure-openai-proxy:latest
    
  • Prerequisites: Docker, Azure OpenAI Endpoint, Azure API Key.
  • Docs: Azure OpenAI Proxy Introduction English | 中文

Highlighted Details

  • Supports proxying for /v1/chat/completions, /v1/completions, and /v1/embeddings.
  • Includes support for the /v1/models interface and handles cross-domain OPTIONS requests.
  • Offers both reverse proxy and forward proxy modes.
  • Allows custom mapping of model names to Azure deployment names via AZURE_OPENAI_MODEL_MAPPER.

Maintenance & Community

  • Last updated April 2023.
  • No explicit community links (Discord/Slack) or roadmap are provided in the README.

Licensing & Compatibility

  • License: MIT
  • Compatibility: Permissive MIT license allows for commercial use and integration with closed-source projects.

Limitations & Caveats

The proxy does not have built-in HTTPS support for forward proxy usage, requiring an external HTTPS proxy like Nginx. The project's last update was in April 2023, which may indicate limited ongoing maintenance.

Health Check
Last commit

1 year ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.