Spaces:
Sleeping
Sleeping
updates server documentation with global examples
Browse files
server.py
CHANGED
@@ -8,10 +8,19 @@ from middlewares import api_key_middleware, json_parsing_middleware
|
|
8 |
"""
|
9 |
# Test chat endpoint with curl
|
10 |
```
|
|
|
11 |
curl --no-buffer -X POST http://0.0.0.0:10000/chat/ -H "api_key: hey-michal" -d '{"k": 5, "timeout": 15, "roles": ["user"], "messages": ["on what exact date did the 21st century begin??"]}'
|
12 |
|
|
|
|
|
|
|
|
|
13 |
# echo stream test endpoint
|
|
|
14 |
curl --no-buffer -X POST http://0.0.0.0:10000/echo/ -H "api_key: hey-michal" -d '{"k": 3, "timeout": 0.2, "roles": ["user"], "messages": ["i need to tell you something important but first"]}'
|
|
|
|
|
|
|
15 |
```
|
16 |
|
17 |
TROUBLESHOOT
|
|
|
8 |
"""
|
9 |
# Test chat endpoint with curl
|
10 |
```
|
11 |
+
//Local:
|
12 |
curl --no-buffer -X POST http://0.0.0.0:10000/chat/ -H "api_key: hey-michal" -d '{"k": 5, "timeout": 15, "roles": ["user"], "messages": ["on what exact date did the 21st century begin??"]}'
|
13 |
|
14 |
+
//Global:
|
15 |
+
curl --no-buffer -X POST http://129.146.127.82:10000/chat/ -H "api_key: hey-michal" -d '{"k": 5, "timeout": 15, "roles": ["user"], "messages": ["on what exact date did the 21st century begin??"]}'
|
16 |
+
curl --no-buffer -X POST http://129.146.127.82:10000/chat/ -H "api_key: hey-michal" -d '{"k": 5, "timeout": 15, "roles": ["user"], "messages": ["What is the meaning of life??"]}'
|
17 |
+
|
18 |
# echo stream test endpoint
|
19 |
+
//Local
|
20 |
curl --no-buffer -X POST http://0.0.0.0:10000/echo/ -H "api_key: hey-michal" -d '{"k": 3, "timeout": 0.2, "roles": ["user"], "messages": ["i need to tell you something important but first"]}'
|
21 |
+
|
22 |
+
//Global
|
23 |
+
curl --no-buffer -X POST http://129.146.127.82:10000/echo/ -H "api_key: hey-michal" -d '{"k": 3, "timeout": 0.2, "roles": ["user"], "messages": ["i need to tell you something important but first"]}'
|
24 |
```
|
25 |
|
26 |
TROUBLESHOOT
|