📖 Docs: Update documentation
Browse files- README.md +34 -1
- README_CN.md +34 -1
README.md
CHANGED
@@ -206,7 +206,17 @@ yym68686/uni-api:latest
|
|
206 |
|
207 |
After clicking the one-click deploy button above, set the environment variable `CONFIG_URL` to the direct link of the configuration file, `DISABLE_DATABASE` to true, and then click Create to create the project. After deployment, you need to manually set the Function Max Duration to 60 seconds in the Vercel project panel under Settings -> Functions, and then click the Deployments menu and click Redeploy to redeploy, which will set the timeout to 60 seconds. If you do not redeploy, the default timeout will remain at the original 10 seconds. Note that you should not delete the Vercel project and recreate it; instead, click redeploy in the Deployments menu within the currently deployed Vercel project to make the Function Max Duration modification take effect.
|
208 |
|
209 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
|
211 |
First, log in to the panel, in Additional services click on the tab Run your own applications to enable the option to run your own programs, then go to the panel Port reservation to randomly open a port.
|
212 |
|
@@ -329,6 +339,29 @@ curl -X POST http://127.0.0.1:8000/v1/chat/completions \
|
|
329 |
-d '{"model": "gpt-4o","messages": [{"role": "user", "content": "Hello"}],"stream": true}'
|
330 |
```
|
331 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
## Sponsors
|
333 |
|
334 |
We thank the following sponsors for their support:
|
|
|
206 |
|
207 |
After clicking the one-click deploy button above, set the environment variable `CONFIG_URL` to the direct link of the configuration file, `DISABLE_DATABASE` to true, and then click Create to create the project. After deployment, you need to manually set the Function Max Duration to 60 seconds in the Vercel project panel under Settings -> Functions, and then click the Deployments menu and click Redeploy to redeploy, which will set the timeout to 60 seconds. If you do not redeploy, the default timeout will remain at the original 10 seconds. Note that you should not delete the Vercel project and recreate it; instead, click redeploy in the Deployments menu within the currently deployed Vercel project to make the Function Max Duration modification take effect.
|
208 |
|
209 |
+
## Ubuntu deployment
|
210 |
+
|
211 |
+
In the warehouse Releases, find the latest version of the corresponding binary file, for example, a file named uni-api-linux-x86_64-0.0.99.pex. Download the binary file on the server and run it:
|
212 |
+
|
213 |
+
```bash
|
214 |
+
wget https://github.com/yym68686/uni-api/releases/download/v0.0.99/uni-api-linux-x86_64-0.0.99.pex
|
215 |
+
chmod +x uni-api-linux-x86_64-0.0.99.pex
|
216 |
+
./uni-api-linux-x86_64-0.0.99.pex
|
217 |
+
```
|
218 |
+
|
219 |
+
## Serv00 Remote Deployment (FreeBSD 14.0)
|
220 |
|
221 |
First, log in to the panel, in Additional services click on the tab Run your own applications to enable the option to run your own programs, then go to the panel Port reservation to randomly open a port.
|
222 |
|
|
|
339 |
-d '{"model": "gpt-4o","messages": [{"role": "user", "content": "Hello"}],"stream": true}'
|
340 |
```
|
341 |
|
342 |
+
pex linux packaging:
|
343 |
+
|
344 |
+
```bash
|
345 |
+
VERSION=$(cat VERSION)
|
346 |
+
pex -D . -r requirements.txt \
|
347 |
+
-c uvicorn \
|
348 |
+
--inject-args 'main:app --host 0.0.0.0 --port 8000' \
|
349 |
+
--platform linux_x86_64-cp-3.10.12-cp310 \
|
350 |
+
--interpreter-constraint '==3.10.*' \
|
351 |
+
--no-strip-pex-env \
|
352 |
+
-o uni-api-linux-x86_64-${VERSION}.pex
|
353 |
+
```
|
354 |
+
|
355 |
+
macOS packaging:
|
356 |
+
|
357 |
+
```bash
|
358 |
+
VERSION=$(cat VERSION)
|
359 |
+
pex -r requirements.txt \
|
360 |
+
-c uvicorn \
|
361 |
+
--inject-args 'main:app --host 0.0.0.0 --port 8000' \
|
362 |
+
-o uni-api-macos-arm64-${VERSION}.pex
|
363 |
+
```
|
364 |
+
|
365 |
## Sponsors
|
366 |
|
367 |
We thank the following sponsors for their support:
|
README_CN.md
CHANGED
@@ -206,7 +206,17 @@ yym68686/uni-api:latest
|
|
206 |
|
207 |
点击上面的一键部署按钮后,设置环境变量 `CONFIG_URL` 为配置文件的直链, `DISABLE_DATABASE` 为 true,然后点击 Create 创建项目。部署完之后需要手动在 vercel 项目面板的 Settings -> Funcitons -> Function Max Duration 设置为 60 秒,然后点击 Deployments 菜单点击 Redeploy 重新部署,即可将超时时间设置为 60 秒,如果不重新部署,默认超时时间将是原来的 10 秒。注意不是删掉 vercel 项目重建,而是在当前部署好的 vercel 项目里面的 Deployments 菜单里面点 redeploy,这样才能让 Function Max Duration 的修改生效。
|
208 |
|
209 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
|
211 |
首先登录面板,Additional services 里面点击选项卡 Run your own applications 开启允许运行自己的程序,然后到面板 Port reservation 去随便开一个端口。
|
212 |
|
@@ -329,6 +339,29 @@ curl -X POST http://127.0.0.1:8000/v1/chat/completions \
|
|
329 |
-d '{"model": "gpt-4o","messages": [{"role": "user", "content": "Hello"}],"stream": true}'
|
330 |
```
|
331 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
## 赞助商
|
333 |
|
334 |
我们感谢以下赞助商的支持:
|
|
|
206 |
|
207 |
点击上面的一键部署按钮后,设置环境变量 `CONFIG_URL` 为配置文件的直链, `DISABLE_DATABASE` 为 true,然后点击 Create 创建项目。部署完之后需要手动在 vercel 项目面板的 Settings -> Funcitons -> Function Max Duration 设置为 60 秒,然后点击 Deployments 菜单点击 Redeploy 重新部署,即可将超时时间设置为 60 秒,如果不重新部署,默认超时时间将是原来的 10 秒。注意不是删掉 vercel 项目重建,而是在当前部署好的 vercel 项目里面的 Deployments 菜单里面点 redeploy,这样才能让 Function Max Duration 的修改生效。
|
208 |
|
209 |
+
## Ubuntu 部署
|
210 |
+
|
211 |
+
在仓库 Releases 找到对应的二进制文件最新版本,例如名为 uni-api-linux-x86_64-0.0.99.pex 的文件。在服务器下载二进制文件并运行:
|
212 |
+
|
213 |
+
```bash
|
214 |
+
wget https://github.com/yym68686/uni-api/releases/download/v0.0.99/uni-api-linux-x86_64-0.0.99.pex
|
215 |
+
chmod +x uni-api-linux-x86_64-0.0.99.pex
|
216 |
+
./uni-api-linux-x86_64-0.0.99.pex
|
217 |
+
```
|
218 |
+
|
219 |
+
## serv00 远程部署(FreeBSD 14.0)
|
220 |
|
221 |
首先登录面板,Additional services 里面点击选项卡 Run your own applications 开启允许运行自己的程序,然后到面板 Port reservation 去随便开一个端口。
|
222 |
|
|
|
339 |
-d '{"model": "gpt-4o","messages": [{"role": "user", "content": "Hello"}],"stream": true}'
|
340 |
```
|
341 |
|
342 |
+
pex linux 打包:
|
343 |
+
|
344 |
+
```bash
|
345 |
+
VERSION=$(cat VERSION)
|
346 |
+
pex -D . -r requirements.txt \
|
347 |
+
-c uvicorn \
|
348 |
+
--inject-args 'main:app --host 0.0.0.0 --port 8000' \
|
349 |
+
--platform linux_x86_64-cp-3.10.12-cp310 \
|
350 |
+
--interpreter-constraint '==3.10.*' \
|
351 |
+
--no-strip-pex-env \
|
352 |
+
-o uni-api-linux-x86_64-${VERSION}.pex
|
353 |
+
```
|
354 |
+
|
355 |
+
macos 打包:
|
356 |
+
|
357 |
+
```bash
|
358 |
+
VERSION=$(cat VERSION)
|
359 |
+
pex -r requirements.txt \
|
360 |
+
-c uvicorn \
|
361 |
+
--inject-args 'main:app --host 0.0.0.0 --port 8000' \
|
362 |
+
-o uni-api-macos-arm64-${VERSION}.pex
|
363 |
+
```
|
364 |
+
|
365 |
## 赞助商
|
366 |
|
367 |
我们感谢以下赞助商的支持:
|