chatgpt-adapter  by bincooo

Adapter for multiple chat APIs to OpenAI API standard

created 2 years ago
1,035 stars

Top 36.9% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a unified API gateway for multiple AI chat and image generation services, abstracting their diverse interfaces into a single OpenAI-compatible endpoint. It targets developers and users who want to integrate various AI models, including those from Coze, DeepSeek, Hugging Face, and Microsoft's Copilot and Bing, into their applications without managing individual API complexities. The primary benefit is simplified access to a wide range of AI capabilities through a familiar OpenAI API structure.

How It Works

The adapter acts as a reverse proxy, intercepting requests and translating them into the specific formats required by each integrated AI service. It leverages Go for its performance and concurrency, with a custom tool (iocgo) used during the build process to handle the complex reverse-engineering and adaptation logic for each AI's unique API protocols, including Protobuf and gzip for services like Cursor and Windsurf. This approach allows for high-speed streaming output and multi-turn conversations, maintaining compatibility with the OpenAI API standard.

Quick Start & Requirements

  • Install: make install
  • Build: make build
  • Run: ./bin/[os]/server[.exe]
  • Docker: docker run -p 8080:8080 -v ./config.yaml:/app/config.yaml ghcr.io/bincooo/chatgpt-adapter:latest
  • Prerequisites: Go compiler, intermediate compilation tools. Configuration requires a config.yaml file.
  • Documentation: 查阅文档

Highlighted Details

  • Supports OpenAI API standard, enabling compatibility with existing tools and libraries.
  • Integrates a wide array of AI services including Coze, DeepSeek, Cursor, Windsurf, You.com, Grok, and Bing Image.
  • Offers high-speed streaming output and multi-turn conversation support.
  • Includes reverse-engineering insights for services like New Bing, Copilot, Cursor, and Windsurf.

Maintenance & Community

The project is actively maintained by bincooo. Further community engagement details (like Discord/Slack) are not explicitly mentioned in the README.

Licensing & Compatibility

The project explicitly states it is for "test and learning research only" and prohibits commercial use. It disclaims responsibility for any legal issues arising from its use.

Limitations & Caveats

The project is strictly for non-commercial, educational purposes. Users are warned to remove the code within 24 hours of download. The project's reliance on reverse-engineered APIs means it is susceptible to breaking changes if the underlying services alter their protocols.

Health Check
Last commit

1 week ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.