alcex commited on
Commit
4455ad7
·
verified ·
1 Parent(s): 51ab19f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -94
README.md CHANGED
@@ -1,94 +1,11 @@
1
- # [free-gpt3.5-2api](https://github.com/aurorax-neo/free-gpt3.5-2api)
2
-
3
- ## 接口
4
-
5
- #### /v1/tokens
6
-
7
- ```
8
- curl --location --request GET 'http://127.0.0.1:9846/v1/tokens' \
9
- --header 'Authorization: Bearer abc'
10
- ```
11
-
12
- 返回示例说明:`count`为授权池中可用授权数,如果`count` 为 `0`请检查`ip`是否支持 `openai`
13
-
14
- ```
15
- {
16
- "count": 0
17
- }
18
- ```
19
-
20
- #### /v1/chat/completions
21
-
22
- ###### 支持返回stream和json
23
-
24
- ```
25
- http://<ip>:<port>/v1/chat/completions
26
- ```
27
-
28
- ##### 示例
29
-
30
- ```
31
- curl http://127.0.0.1:9846
32
- ```
33
-
34
- ```
35
- curl --location --request POST 'http://127.0.0.1:9846/v1/chat/completions' \
36
- --header 'Authorization: Bearer abc' \
37
- --header 'Content-Type: application/json' \
38
- --data-raw '{
39
- "model": "gpt-3.5-turbo",
40
- "messages": [
41
- {
42
- "role": "user",
43
- "content": "西红柿炒钢丝球怎么做?"
44
- }
45
- ],
46
- "stream": false
47
- }'
48
- ```
49
-
50
- ## 配置
51
-
52
- ### 环境变量
53
-
54
- ```
55
- LOG_LEVEL=info # debug, info, warn, error
56
- LOG_PATH= # 日志文件路径,默认为空(不生成日志文件)
57
- BIND=0.0.0.0 # 127.0.0.1
58
- PORT=3040
59
- PROXY= # http://127.0.0.1:7890,http://127.0.0.1:7890 已支持多个代理(英文 "," 分隔)
60
- AUTHORIZATIONS= # abc,bac (英文 "," 分隔)
61
- BASE_URL= # 默认:https://chat.openai.com
62
- POOL_MAX_COUNT=64 # max number of connections to keep in the pool 默认:64
63
- AUTH_ED=600 # expiration time for the authorization in seconds 默认:600
64
- ```
65
-
66
- ###### 也可使用与程序同目录下 `.env` 文件配置上述字段
67
-
68
-
69
- ### docker部署
70
-
71
- ##### 1 .创建文件夹
72
-
73
- ```
74
- mkdir -p $PWD/free-gpt3.5-2api
75
- ```
76
-
77
- ##### 2.拉取镜像启动
78
-
79
- ```
80
- docker run -itd --name=free-gpt3.5-2api -p 9846:3040 ghcr.io/aurorax-neo/free-gpt3.5-2api
81
- ```
82
-
83
- ##### 3.更新容器
84
-
85
- ```
86
- docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower -cR free-gpt3.5-2api --debug
87
- ```
88
-
89
- ### Koyeb部署
90
-
91
- ###### 注意:`Regions`请选择支持`openai`免登的区域!!!
92
-
93
- [![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?type=docker&name=free-gpt3-5-2api&region=par&ports=3040;http;/&image=ghcr.io/aurorax-neo/free-gpt3.5-2api)
94
-
 
1
+ ---
2
+ title: Chat
3
+ emoji: 👀
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: docker
7
+ pinned: false
8
+ app_port: 3040
9
+ ---
10
+
11
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference