Spaces:
Paused
Paused
ffreemt
commited on
Commit
·
bebb80b
1
Parent(s):
6f8b8b6
Update debug=True
Browse files- duck2api_fwd.py +5 -2
duck2api_fwd.py
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
|
|
| 1 |
# https://linux.do/t/topic/120588/5
|
| 2 |
|
| 3 |
# flask 糊接口
|
| 4 |
#
|
| 5 |
# curl -sS --location http://127.0.0.1:5000/hf/v1/chat/completions -H "Content-Type: application/json" --data "{\"model\": \"gpt-.5-turbo\", \"messages\": [{\"role\": \"user\", \"content\": \"Say this is a test!\"}], \"stream\": false}"
|
| 6 |
|
| 7 |
-
# --data '{"model": "gpt
|
| 8 |
|
|
|
|
|
|
|
| 9 |
from threading import Thread
|
| 10 |
|
| 11 |
import requests
|
|
@@ -78,4 +81,4 @@ def my_endpoint():
|
|
| 78 |
|
| 79 |
|
| 80 |
if __name__ == "__main__":
|
| 81 |
-
app.run(port=5000)
|
|
|
|
| 1 |
+
"""
|
| 2 |
# https://linux.do/t/topic/120588/5
|
| 3 |
|
| 4 |
# flask 糊接口
|
| 5 |
#
|
| 6 |
# curl -sS --location http://127.0.0.1:5000/hf/v1/chat/completions -H "Content-Type: application/json" --data "{\"model\": \"gpt-.5-turbo\", \"messages\": [{\"role\": \"user\", \"content\": \"Say this is a test!\"}], \"stream\": false}"
|
| 7 |
|
| 8 |
+
# --data '{"model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "Say this is a test!"}], "stream": false}'
|
| 9 |
|
| 10 |
+
curl https://mikeee-duck2api.hf.space/hf/v1/chat/completions -H "Content-Type: application/json" --data "{\"model\": \"gpt-3.5-turbo\", \"messages\": [{\"role\": \"user\", \"content\": \"Say this is a test!\"}], \"stream\": false}"
|
| 11 |
+
"""
|
| 12 |
from threading import Thread
|
| 13 |
|
| 14 |
import requests
|
|
|
|
| 81 |
|
| 82 |
|
| 83 |
if __name__ == "__main__":
|
| 84 |
+
app.run(port=5000, debug=True)
|