Coder Social home page Coder Social logo

skyzhao3q / cf-openai-azure-proxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haibbo/cf-openai-azure-proxy

0.0 0.0 0.0 3 KB

A Cloudflare worker script to proxy OpenAI‘s request to Azure OpenAI Service

License: MIT License

JavaScript 100.00%

cf-openai-azure-proxy's Introduction

cf-openai-azure-proxy

大多数 OpenAI 客户端不支持 Azure OpenAI Service,但Azure OpenAI Service的申请和绑卡都非常简单,并且还提供了免费的额度。此脚本使用免费的 Cloudflare Worker 作为代理,使得支持 OpenAI 的客户端可以直接使用 Azure OpenAI Service。

代理 OpenAI 的请求到 Azure OpenAI Serivce,代码部署步骤:

  1. 注册并登录到 Cloudflare 账户
  2. 创建一个新的 Cloudflare Worker
  3. cf-openai-azure-proxy.js 复制并粘贴到 Cloudflare Worker 编辑器中
  4. 修改对应的 resourceName 和 deployName
  5. 保存并部署 Cloudflare Worker
  6. 必须绑定自定义域名: 在 Worker 详情页 -> Trigger -> Custom Domains 中为这个 Worker 添加一个自定义域名

使用说明

第四步中的 resourceName 和 deployName, 必须要选对, 登录到Azure的后台:

azure

客户端

以 OpenCat 为例: 自定义 API 域名填写 第六步绑定的域名:

opencat

我已经尝试了多种客户端, 如果遇到其他客户端有问题, 欢迎创建issue.

cf-openai-azure-proxy's People

Contributors

haibbo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.