Giter Club home page Giter Club logo

cloudflare-ai-web's Introduction

cloudflare-ai-web

AI 启动!

一键部署(推荐)

Deploy with Vercel

示例:https://ai.jaze.top

Deno Deploy

https://dash.deno.com

  • Fork 本仓库
  • Build Step改为NITRO_PRESET=deno-deploy npm run build_node
  • Deploy Project
  • 设置环境变量

Docker

docker run -d --name cloudflare-ai-web \
  -e CF_TOKEN=YOUR_CF_TOKEN \
  -e CF_GATEWAY=YOUR_CF_GATEWAY \
  -p 3000:3000 \
  --restart=always \
  jazee6/cloudflare-ai-web

特性

  • 利用 Cloudflare Workers AI 快速搭建多模态AI平台
  • 支持 Serverless 部署,无需服务器
  • 支持开启访问密码,聊天记录本地存储
  • 轻量化(~638 kB gzip)
  • 支持ChatGPT Gemini Pro

模型支持

https://developers.cloudflare.com/workers-ai/models/

部署说明

环境变量列表

名称 描述
CF_TOKEN Cloudflare Workers AI Token
CF_GATEWAY Cloudflare AI Gateway URL
OPENAI_API_KEY OpenAI API Key (需要ChatGPT时填写)
G_API_KEY Google AI API Key (需要GeminiPro时填写)
G_API_URL Google AI 反代 (非美国ip填写,或参考以下配置)
PASSWORD 访问密码 (可选)

CF_TOKEN

https://dash.cloudflare.com/profile/api-tokens

  • 单击创建令牌
  • 使用Workers AI (Beta)模板
  • 单击继续以显示摘要
  • 单击创建令牌
  • 复制您的令牌,设置环境变量

CF_GATEWAY

https://dash.cloudflare.com/

  • Cloudflare 侧栏 AI - AI Gateway
  • 添加新 AI Gateway
  • 填写名称和URL slug创建
  • 单击右上角API Endpoints
  • 复制您的Universal Endpoint,设置环境变量

G_API_KEY

https://ai.google.dev/tutorials/rest_quickstart#set_up_your_api_key

G_API_URL

参考 https://github.com/Jazee6/gemini-proxy 搭建反代

或者在nuxt.config.ts中添加以下配置

nitro: {
    vercel: {
        regions: ["cle1", "iad1", "pdx1", "sfo1", "sin1", "syd1", "hnd1", "kix1"]
    }
}

Star History

Star History Chart

cloudflare-ai-web's People

Contributors

deno-deploy[bot] avatar jazee6 avatar roshanca 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.