Spaces:
Sleeping
Sleeping
Claude Sonnet 4.6
feat: Cielo persistent message history — cielo_messages table, recommendations linked to outcomes
8a224e0 Download characters/cielo/migration_messages.sql from alesamodio/Socrates_docker: direct link, hf CLI and curl.
- Browser
- Download file 874 Bytes
-
https://huggingface.co/spaces/alesamodio/Socrates_docker/resolve/main/characters/cielo/migration_messages.sql
- Command line
-
hf download hf://spaces/alesamodio/Socrates_docker/characters/cielo/migration_messages.sql
-
curl -L -o migration_messages.sql https://huggingface.co/spaces/alesamodio/Socrates_docker/resolve/main/characters/cielo/migration_messages.sql
874 Bytes
| -- ============================================================ | |
| -- Cielo message history — run once in the Supabase SQL editor | |
| -- Stores the full conversation Cielo has had with each user, | |
| -- independently of the general sliding-window chat history. | |
| -- ============================================================ | |
| CREATE TABLE IF NOT EXISTS cielo_messages ( | |
| id UUID DEFAULT gen_random_uuid() PRIMARY KEY, | |
| user_id TEXT NOT NULL, | |
| role TEXT NOT NULL, -- 'user' or 'cielo' | |
| content TEXT NOT NULL, | |
| created_at TIMESTAMPTZ DEFAULT now() | |
| ); | |
| CREATE INDEX IF NOT EXISTS idx_cielo_messages_user_id_time | |
| ON cielo_messages (user_id, created_at DESC); | |
| ALTER TABLE cielo_messages ENABLE ROW LEVEL SECURITY; | |
| CREATE POLICY "service_role_all_cielo_messages" ON cielo_messages | |
| FOR ALL TO service_role USING (true) WITH CHECK (true); | |