Skip to content

tsui66/gemini-rewrite

This branch is 3 commits ahead of gptea-ai/link-to-openai:main.

Repository files navigation

OpenAI/ChatGPT Proxy Via Deno

Usage

Using OpenAI/ChatGPT official npm package:

import { Configuration } from "openai";

const configuration = new Configuration({
  apiKey: process.env.OPENAI_API_KEY,
+ basePath: "https://linkai.deno.dev/v1",
});

Using OpenAI/ChatGPT official Python package:

  import openai

  openai.api_key = os.getenv("OPENAI_API_KEY")
+ openai.api_base = "https://linkai.deno.dev/v1"

Getting Started With Local Development

deno run --allow-net --allow-read --allow-env --watch main.ts

Self-Hosting

Use DENO_REGION to serve region-specific content in your Deno projects, which is useful for users in different parts of the world. Check out the documentation at https://deno.com/deploy/docs/projects#preset-variables.

Check the list of supported countries at https://platform.openai.com/docs/supported-countries/supported-countries-and-territories and select those regions for your project to ensure your users can access OpenAI features.

Click this link to quickly deploy to Deno Deploy with one click.

About

Gemini Proxy via Deno Deploy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%