Spaces:
Runtime error
Runtime error
Download example/chatgpt.http from dvc890/go-chatgpt-api: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/spaces/dvc890/go-chatgpt-api/resolve/main/example/chatgpt.http
- Command line
-
hf download hf://spaces/dvc890/go-chatgpt-api/example/chatgpt.http
-
curl -L -o chatgpt.http https://huggingface.co/spaces/dvc890/go-chatgpt-api/resolve/main/example/chatgpt.http
1.08 kB
| ### login | |
| POST http://127.0.0.1:8080/chatgpt/login | |
| Content-Type: application/json | |
| { | |
| "username": "{{username}}", | |
| "password": "{{password}}" | |
| } | |
| ### get conversations | |
| GET http://127.0.0.1:8080/chatgpt/conversations | |
| Authorization: Bearer {{accessToken}} | |
| ### create conversation | |
| POST http://127.0.0.1:8080/chatgpt/conversation | |
| Authorization: Bearer {{accessToken}} | |
| Content-Type: application/json | |
| Accept: text/event-stream | |
| { | |
| "action": "next", | |
| "messages": [ | |
| { | |
| "id": "{{$random.uuid}}", | |
| "author": { | |
| "role": "user" | |
| }, | |
| "content": { | |
| "content_type": "text", | |
| "parts": [ | |
| "hello" | |
| ] | |
| }, | |
| "metadata": {} | |
| } | |
| ], | |
| "model": "gpt-4", | |
| "timezone_offset_min": -480, | |
| "history_and_training_disabled": false | |
| } | |
| > {% | |
| response.body.onEachLine((data) => { | |
| client.log(data.toString()); | |
| }) | |
| %} | |
| ### get models | |
| GET http://127.0.0.1:8080/chatgpt/models | |
| Authorization: Bearer {{accessToken}} | |
| ### check account | |
| GET http://127.0.0.1:8080/chatgpt/accounts/check | |
| Authorization: Bearer {{accessToken}} | |