GithubHelp home page GithubHelp logo

evanssec / duck2api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aurora-develop/duck2api

0.0 0.0 0.0 558 KB

License: MIT License

Shell 0.23% Go 99.30% Batchfile 0.31% Dockerfile 0.15% Procfile 0.01%

duck2api's Introduction

duck2api

交流群

https://t.me/aurora_develop

Web端

访问http://你的服务器ip:8080/web

web使用

编译部署

git clone https://github.com/aurora-develop/duck2api
cd duck2api
go build -o duck2api
chmod +x ./duck2api
./duck2api

Docker部署

Docker部署

您需要安装Docker和Docker Compose。

docker run -d \
  --name duck2api \
  -p 8080:8080 \
  ghcr.io/aurora-develop/duck2api:latest

Docker Compose部署

创建一个新的目录,例如duck2api,并进入该目录:

mkdir duck2api
cd duck2api

在此目录中下载库中的docker-compose.yml文件:

docker-compose up -d

Usage

curl --location 'http://你的服务器ip:8080/v1/chat/completions' \
--header 'Content-Type: application/json' \
--data '{
     "model": "gpt-3.5-turbo",
     "messages": [{"role": "user", "content": "Say this is a test!"}],
     "stream": true
   }'

支持claude和gpt-3.5-turbo

高级设置

默认情况不需要设置,除非你有需求

环境变量


Authorization=your_authorization  用户认证 key。
TLS_CERT=path_to_your_tls_cert 存储TLS(传输层安全协议)证书的路径。
TLS_KEY=path_to_your_tls_key 存储TLS(传输层安全协议)证书的路径。
PROXY_URL=your_proxy_url 添加代理池来。

鸣谢

感谢各位大佬的pr支持,感谢。

参考项目

https://github.com/xqdoo00o/ChatGPT-to-API

License

MIT License

duck2api's People

Contributors

xiaozhou26 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.