Skip to content

Commit fa06dd5

Browse files
Add Sanity CMS blog memory example
* Add sanity-blog-memory cookbook example A complete example showing how to sync Sanity CMS blog posts to Hindsight for semantic search and AI-powered content discovery. Features: - Document-based sync with upsert support - Semantic search and temporal queries - Related content discovery - AI reflection for content insights - Docker Compose setup for local development Addresses vectorize-io/hindsight#161 * Fix variable shadowing in README example
1 parent 8bd761a commit fa06dd5

10 files changed

Lines changed: 1065 additions & 0 deletions

File tree

sanity-blog-memory/.env.example

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Hindsight Configuration
2+
HINDSIGHT_API_URL=http://localhost:8888
3+
HINDSIGHT_BANK_ID=blog-memory
4+
5+
# Sanity CMS Configuration
6+
SANITY_PROJECT_ID=your-project-id
7+
SANITY_DATASET=production
8+
SANITY_API_VERSION=2024-01-09
9+
10+
# LLM Provider (for Hindsight)
11+
# Hindsight needs an LLM for fact extraction and reflect operations
12+
# Choose one provider and set the corresponding API key
13+
14+
# Option 1: OpenAI
15+
OPENAI_API_KEY=sk-...
16+
17+
# Option 2: Google Gemini (free tier available)
18+
# GOOGLE_API_KEY=...
19+
20+
# Option 3: Groq (free tier available)
21+
# GROQ_API_KEY=...

sanity-blog-memory/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build output
5+
dist/
6+
7+
# Environment
8+
.env
9+
.env.local
10+
11+
# OS
12+
.DS_Store
13+
Thumbs.db
14+
15+
# IDE
16+
.vscode/
17+
.idea/
18+
19+
# Logs
20+
*.log
21+
npm-debug.log*

0 commit comments

Comments
 (0)