Black Goku commited on
Commit
dd9cf5f
·
verified ·
1 Parent(s): 6a8a6a9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -25
README.md CHANGED
@@ -11,33 +11,15 @@ license: mit
11
 
12
  # Yappy — AI backend
13
 
14
- Yappy is an AI companion that motivates, builds discipline, supports, or
15
- just chats — depending on the mode you pick. Created by Rik.
16
 
17
- This Space runs the backend: a FastAPI server wrapping Qwen2.5-3B-Instruct
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
- ## Memory model
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
- All endpoints (except `/` and `/health`) expect header:
 
 
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 }