Skip to content

zxxhz/deno-proxy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Deno OpenAI proxy

很多VPS代理OpenAI api被封,可以采用Deno Deploy免费服务来做代理,可以在国内直接访问。

一键部署

调用示例

const axios = require('axios')

axios.post("https://xxx.deno.dev/v1/chat/completions", {
  "model": "gpt-3.5-turbo",
  "messages": [{ "role": "user", "content": "Hello!" }],
  "stream": true
}, {
  responseType: "stream",
  headers: {
    "Authorization": 'Bearer $OPENAI_API_KEY'
  }
}).then(resp => {
  resp.data.on("data", (chunk) => {
    console.log(chunk.toString())
  })
})

About

Using Deno as a proxy server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%