Black Goku commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,33 +11,15 @@ license: mit
|
|
| 11 |
|
| 12 |
# Yappy — AI backend
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
|
| 17 |
-
|
| 18 |
-
(GGUF, via `llama-cpp-python`) on CPU, with streaming responses. The
|
| 19 |
-
frontend (PWA) is hosted separately on Vercel and calls this Space's API.
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
**This server is stateless.** It holds no conversation history of its
|
| 24 |
-
own. The frontend (browser localStorage) owns the chat history and sends
|
| 25 |
-
the relevant messages back with every request in the `history` field.
|
| 26 |
-
|
| 27 |
-
- Chat history survives the Space sleeping or restarting.
|
| 28 |
-
- Each mode (motivation/discipline/support/chat) should keep its own
|
| 29 |
-
separate history array client-side and send only that mode's history.
|
| 30 |
-
- The server does no per-user storage, no database, no cookies.
|
| 31 |
-
|
| 32 |
-
## Modes
|
| 33 |
-
|
| 34 |
-
| Mode | Behavior |
|
| 35 |
-
|---|---|
|
| 36 |
-
| `motivation` | Roasts you hard to get you moving |
|
| 37 |
-
| `discipline` | Serious, lays out consequences of success vs failure |
|
| 38 |
-
| `support` | Soft, validating, listens first |
|
| 39 |
-
| `chat` | Just a casual friendly conversation |
|
| 40 |
|
| 41 |
## API
|
| 42 |
|
| 43 |
-
|
|
|
|
|
|
| 11 |
|
| 12 |
# Yappy — AI backend
|
| 13 |
|
| 14 |
+
Uses Hugging Face's hosted Inference API instead of running a model
|
| 15 |
+
locally — avoids overloading the free CPU Space.
|
| 16 |
|
| 17 |
+
## Required secrets
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
- **HF_TOKEN** (required) — HF access token with Inference API permissions
|
| 20 |
+
- **YAPPY_API_KEY** (optional) — shared secret for request auth
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
## API
|
| 23 |
|
| 24 |
+
POST /chat/stream — SSE stream, events: thinking, token, done
|
| 25 |
+
POST /chat — non-streaming, returns { reply, thinking }
|