coze2openai  by fatwang2

API conversion layer for Coze

created 1 year ago
642 stars

Top 52.9% on sourcepulse

GitHubView on GitHub
Project Summary

This project enables users to leverage Coze's AI capabilities, including its LLMs, knowledge bases, plugins, and workflows, through any OpenAI-compatible client. It acts as a proxy, translating Coze API requests into the OpenAI API format, benefiting users who prefer existing OpenAI client ecosystems.

How It Works

The project functions as a reverse proxy, intercepting requests intended for the OpenAI API and reformatting them for the Coze API. It supports both streaming and blocking responses, offering flexibility in how users interact with the Coze models. The core advantage lies in its ability to unify access to Coze's advanced features within familiar OpenAI client interfaces, simplifying integration and enhancing user experience.

Quick Start & Requirements

  • Install/Run: docker-compose up -d (after cloning and configuring .env) or pnpm install && pnpm start for local deployment.
  • Prerequisites: Docker, Node.js (for local), Coze API token, Coze Bot ID.
  • Setup: Local setup involves cloning, creating .env, installing dependencies, and running. Docker deployment requires Docker and Docker Compose.
  • Docs: https://www.coze.com/space/73428668341****/bot/73428668***** (for obtaining Bot ID).

Highlighted Details

  • Supports Coze.cn and Coze.com endpoints.
  • Enables multi-bot switching via BOT_CONFIG environment variable.
  • Integrates Coze's knowledge base, plugins, and workflows.
  • Offers continuous dialogue with chat history.

Maintenance & Community

The project is actively maintained, with a roadmap indicating future support for image and audio features. Contact information via X and Telegram is provided for feedback and questions.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

Vercel deployment has a 10-second timeout limit for serverless functions, which may impact longer-running Coze operations. Image and audio support are listed as "Coming Soon."

Health Check
Last commit

9 months ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.