cloudflare-proxy  by barretlee

Cloudflare Worker for proxying ChatGPT API requests

created 2 years ago
889 stars

Top 41.5% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a Cloudflare Worker to proxy requests to the ChatGPT API, enabling stream output for clients that cannot directly access api.openai.com. It is intended for users who need a reliable way to interact with the ChatGPT API without maintaining local proxy configurations.

How It Works

The solution leverages Cloudflare Workers to act as an intermediary. It forwards requests to the ChatGPT API, specifically supporting the stream: true parameter for real-time responses. This approach bypasses potential network restrictions or blocks associated with direct API calls, offering a more stable access point.

Quick Start & Requirements

  • Deploy the cloudflare-worker.js script to a new Cloudflare Worker.
  • Add a custom domain to the Worker's trigger settings, as direct Cloudflare domains are reportedly inaccessible.
  • Requires a Cloudflare account.

Highlighted Details

  • Enables stream output for ChatGPT API requests.
  • Acts as a proxy to circumvent direct access issues.
  • Requires a custom domain for the deployed Worker.

Maintenance & Community

No specific information on contributors, sponsorships, or community channels is provided in the README.

Licensing & Compatibility

  • License: MIT
  • Compatible with commercial use and closed-source applications.

Limitations & Caveats

Direct access via Cloudflare's default worker domain is stated to be non-functional, necessitating the setup of a custom domain.

Health Check
Last commit

2 years ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.