-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README.md with deployment instructions and references for duck…
…2api
- Loading branch information
1 parent
61a293d
commit 6b6a376
Showing
4 changed files
with
88 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,87 @@ | ||
# duck2api | ||
# duck2api | ||
|
||
|
||
|
||
# 交流群 | ||
https://t.me/duck2api_develop | ||
|
||
# Web端 | ||
|
||
访问http://你的服务器ip:8080/web | ||
|
||
![web使用](https://jsd.cdn.zzko.cn/gh/xiaozhou26/tuph@main/images/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%202024-04-07%20111706.png) | ||
|
||
|
||
|
||
### 编译部署 | ||
|
||
```bash | ||
git clone https://github.com/aurora-develop/duck2api | ||
cd duck2api | ||
go build -o duck2api | ||
chmod +x ./duck2api | ||
./duck2api | ||
``` | ||
|
||
### Docker部署 | ||
## Docker部署 | ||
您需要安装Docker和Docker Compose。 | ||
|
||
```bash | ||
docker run -d \ | ||
--name duck2api \ | ||
-p 8080:8080 \ | ||
ghcr.io/aurora-develop/duck2api:latest | ||
``` | ||
|
||
## Docker Compose部署 | ||
创建一个新的目录,例如duck2api,并进入该目录: | ||
```bash | ||
mkdir duck2api | ||
cd duck2api | ||
``` | ||
在此目录中下载库中的docker-compose.yml文件: | ||
|
||
```bash | ||
docker-compose up -d | ||
``` | ||
|
||
## Usage | ||
|
||
```bash | ||
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 | ||
}' | ||
``` | ||
|
||
## 高级设置 | ||
|
||
默认情况不需要设置,除非你有需求 | ||
|
||
### 环境变量 | ||
``` | ||
BASE_URL="https://chat.openai.com/backend-api" 代理网关 | ||
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 |
This file was deleted.
Oops, something went wrong.