Skip to content

Commit

Permalink
Update README.md with deployment instructions and references for duck…
Browse files Browse the repository at this point in the history
…2api
  • Loading branch information
xiaozhou26 committed Apr 29, 2024
1 parent 61a293d commit 6b6a376
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 224 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
tag_name: v2.0.6
tag_name: v2.0.7
files: |
duck2api-linux-amd64.tar.gz
duck2api-windows-amd64.tar.gz
Expand Down
118 changes: 0 additions & 118 deletions README copy.md

This file was deleted.

88 changes: 87 additions & 1 deletion README.md
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
104 changes: 0 additions & 104 deletions README_EN.md

This file was deleted.

0 comments on commit 6b6a376

Please sign in to comment.