Skip to content

Commit

Permalink
添加腾讯云函数部署教程
Browse files Browse the repository at this point in the history
  • Loading branch information
easychen committed Mar 7, 2023
1 parent 2b87c61 commit 7447c68
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 5 deletions.
31 changes: 31 additions & 0 deletions FUNC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 此Proxy可以部署到腾讯云函数

① 进入[云函数创建面板](https://console.cloud.tencent.com/scf/list-create?rid=5&ns=default&createType=empty),选择中国香港、web函数、NodeJS 16。

![](images/20230307122958.png)

② 在函数代码处点击`app.js`将本项目 [app.js](/app.js) 的代码粘贴进去。

![](images/20230307123053.png)

其他不用改,点创建。

③ 创建完成后,点击「函数管理」→「函数代码」。等编辑器把函数代码加载完成后 CloudStudio → 终端 → 新终端,打开一个新终端。

![](images/20230307123511.png)

④ 在出现的终端中粘贴以下代码

```bash
cd src && yarn add [email protected] [email protected] [email protected] [email protected] [email protected]
```

![](images/20230307123910.png)

⑤ 点编辑器右上角的「部署」,等待部署完成。

![](images/20230307123957.png)

⑥ 把编辑器往下拉,「访问路径」就是代理API的URL了。

![](images/20230307124127.png)
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# openai-api-proxy

可以部署到docker和云函数的OpenAI API代理
Simple proxy for OpenAi api via a one-line docker command

[简体中文](README.CN.md)
🎉 已经支持SSE,可以实时返回内容

- [腾讯云函数部署教程](FUNC.md)
- [简体中文](README.CN.md)

以下英文由GPT翻译。The following English was translated by GPT.

Expand Down
3 changes: 1 addition & 2 deletions docker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"cross-fetch": "^3.1.5",
"eventsource-parser": "^0.1.0",
"express": "^4.18.2",
"multer": "^1.4.5-lts.1",
"uuid": "^9.0.0"
"multer": "^1.4.5-lts.1"
}
}
Binary file added images/20230307122958.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/20230307123053.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/20230307123511.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/20230307123910.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/20230307123957.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/20230307124127.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/20230307124853.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/20230307131517.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"cross-fetch": "^3.1.5",
"eventsource-parser": "^0.1.0",
"express": "^4.18.2",
"multer": "^1.4.5-lts.1",
"uuid": "^9.0.0"
"multer": "^1.4.5-lts.1"
}
}

0 comments on commit 7447c68

Please sign in to comment.