Update README.md
Browse files
README.md
CHANGED
@@ -1,27 +1,24 @@
|
|
1 |
---
|
2 |
title: Duck2api
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: docker
|
7 |
-
pinned:
|
8 |
license: apache-2.0
|
9 |
short_description: duck 2 api service
|
|
|
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
13 |
|
14 |
|
15 |
# duck2api
|
16 |
-
> 高版本使用镜像网站 https://p.till.us.kg/till/https/duckduckgo.com/?q=DuckDuckGo+AI+Chat&ia=chat&duckai=1 进行访问
|
17 |
-
>
|
18 |
-
|
19 |
-
# Web端
|
20 |
|
21 |
-
|
|
|
22 |
|
23 |
-
本地访问: http://127.0.0.1:7860/web
|
24 |
-
![web使用](https://raw.githubusercontent.com/hhhaiai/Picture/main/img/202410221640721.png)
|
25 |
|
26 |
## Deploy
|
27 |
|
@@ -67,69 +64,6 @@ curl --location 'https://p.till.us.kg/till/https/sanbo1200-duck2api.hf.space/com
|
|
67 |
}'
|
68 |
```
|
69 |
|
70 |
-
### Docker部署
|
71 |
-
暂时支持
|
72 |
-
|
73 |
-
## Usage
|
74 |
-
|
75 |
-
``` bash
|
76 |
-
# 其他地址版本
|
77 |
-
curl --location 'http://你的服务器ip:7860/v1/chat/completions' \
|
78 |
-
--header 'Content-Type: application/json' \
|
79 |
-
--data '{
|
80 |
-
"model": "gpt-4o-mini",
|
81 |
-
"messages": [{"role": "user", "content": "Say this is a test!"}],
|
82 |
-
"stream": true
|
83 |
-
}'
|
84 |
-
# 本地版本
|
85 |
-
curl --location 'http://127.0.0.1:7860/v1/chat/completions' \
|
86 |
-
--header 'Content-Type: application/json' \
|
87 |
-
--data '{
|
88 |
-
"model": "gpt-4o-mini",
|
89 |
-
"messages": [{"role": "user", "content": "Say this is a test!"}],
|
90 |
-
"stream": true
|
91 |
-
}'
|
92 |
-
|
93 |
-
## 系统提示词
|
94 |
-
curl --location 'http://127.0.0.1:7860/v1/chat/completions' \
|
95 |
-
--header 'Content-Type: application/json' \
|
96 |
-
--data '{
|
97 |
-
"model": "gpt-4o-mini",
|
98 |
-
"messages": [{"role":"system","content":"你是一个辅助机器人"},{"role": "user", "content": "你的知识库最后什么日期"}],
|
99 |
-
"stream": true
|
100 |
-
}'
|
101 |
-
|
102 |
-
## 非流式系统提示词
|
103 |
-
curl --location 'http://127.0.0.1:7860/v1/chat/completions' \
|
104 |
-
--header 'Content-Type: application/json' \
|
105 |
-
--data '{
|
106 |
-
"model": "gpt-4o-mini",
|
107 |
-
"messages": [{"role":"system","content":"你是一个辅助机器人"},{"role": "user", "content": "你的知识库最后什么日期"}],
|
108 |
-
"stream": false
|
109 |
-
}'
|
110 |
-
|
111 |
-
## 加入更多参数
|
112 |
-
curl --location 'http://127.0.0.1:7860/v1/chat/completions' \
|
113 |
-
--header 'Content-Type: application/json' \
|
114 |
-
--data '{
|
115 |
-
"model": "gpt-4o-mini",
|
116 |
-
"messages": [{"role":"system","content":"你是一个辅助机器人"},{"role": "user", "content": "你的知识库最后什么日期"}],
|
117 |
-
"stream": true,
|
118 |
-
"temperature":0.35,
|
119 |
-
"top_p":0.15
|
120 |
-
}'
|
121 |
-
|
122 |
-
curl --location 'http://127.0.0.1:7860/v1/chat/completions' \
|
123 |
-
--header 'Content-Type: application/json' \
|
124 |
-
--data '{
|
125 |
-
"model": "gpt-4o-mini",
|
126 |
-
"messages": [{"role":"system","content":"你是一个辅助机器人"},{"role": "user", "content": "你的知识库最后什么日期"}],
|
127 |
-
"stream": false,
|
128 |
-
"temperature":0.35,
|
129 |
-
"top_p":0.15
|
130 |
-
}'
|
131 |
-
|
132 |
-
```
|
133 |
|
134 |
## 支持的模型
|
135 |
|
@@ -150,15 +84,7 @@ TLS_KEY=path_to_your_tls_key 存储TLS(传输层安全协议)证书的路径
|
|
150 |
PROXY_URL=your_proxy_url 添加代理池来。
|
151 |
```
|
152 |
|
153 |
-
## 鸣谢
|
154 |
-
|
155 |
-
感谢各位大佬的pr支持,感谢。
|
156 |
-
|
157 |
## 参考项目
|
158 |
|
159 |
|
160 |
-
https://github.com/xqdoo00o/ChatGPT-to-API
|
161 |
-
|
162 |
-
## License
|
163 |
-
|
164 |
-
MIT License
|
|
|
1 |
---
|
2 |
title: Duck2api
|
3 |
+
emoji: 🏆
|
4 |
+
colorFrom: pink
|
5 |
+
colorTo: red
|
6 |
sdk: docker
|
7 |
+
pinned: true
|
8 |
license: apache-2.0
|
9 |
short_description: duck 2 api service
|
10 |
+
thumbnail: >-
|
11 |
+
https://cdn-uploads.huggingface.co/production/uploads/6642196ec80d018c28a68e9a/PHwTcv57ZhgW7--5-HTRn.png
|
12 |
---
|
13 |
|
14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
15 |
|
16 |
|
17 |
# duck2api
|
|
|
|
|
|
|
|
|
18 |
|
19 |
+
> 高版本使用镜像网站 https://duckduckgo.com/?q=DuckDuckGo+AI+Chat&ia=chat&duckai=1 进行访问
|
20 |
+
>
|
21 |
|
|
|
|
|
22 |
|
23 |
## Deploy
|
24 |
|
|
|
64 |
}'
|
65 |
```
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
## 支持的模型
|
69 |
|
|
|
84 |
PROXY_URL=your_proxy_url 添加代理池来。
|
85 |
```
|
86 |
|
|
|
|
|
|
|
|
|
87 |
## 参考项目
|
88 |
|
89 |
|
90 |
+
https://github.com/xqdoo00o/ChatGPT-to-API
|
|
|
|
|
|
|
|