Giter Site home page Giter Site logo

groq-proxy's Introduction

GroqProxy

GroqProxy一开始是为代理Groq的API而编写的,但也可以用于代理其他任何兼容OpenAI的API。

环境变量

以下是此项目支持的环境变量:

  • HOST: 服务的主机地址,默认为 ::
  • PORT: 服务的端口号,默认为 8000
  • PROXY_URL: 代理服务器的 URL,如果没有设置,将不使用代理。
  • TARGET_URL: 目标 API 的URL,默认为 https://api.groq.com/openai/v1/chat/completions
  • TIMEOUT: httpx 客户端的超时时间(以秒为单位),默认为 60

功能

  • 支持 http/https/socks5 代理
  • 支持流式响应

部署

** 前置条件 **

  1. 具有可以访问目标 API 的代理服务器。
  2. 申请 groq 的访问密钥。

Docker

docker pull ghcr.io/sswest/groq-proxy:latest
docker run -d \ 
  -p 8000:8000 \ 
  -e HOST=127.0.0.1 \
  -e PROXY_URL=http://your-proxy-url:port \ 
  ghcr.io/sswest/groq-proxy:latest

Docker Compose

修改 docker-compose.yml 文件中的 PROXY_URL 环境变量,然后运行以下命令:

docker-compose up -d

groq-proxy's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

whshang

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.