Skip to content

docs: add content-writing cookbook to operations#4566

Merged
whysosaket merged 1 commit intomainfrom
feat/oss-content-writing-cookbook
Mar 28, 2026
Merged

docs: add content-writing cookbook to operations#4566
whysosaket merged 1 commit intomainfrom
feat/oss-content-writing-cookbook

Conversation

@kartik-mem0
Copy link
Copy Markdown
Contributor

Linked Issue

Closes #

Description

Adds an Open Source tab to the Content Creation Workflow cookbook (docs/cookbooks/operations/content-writing.mdx), giving users a fully local alternative alongside the existing Platform version.

The OSS version uses:

  • Mem0 Memory class with Memory.from_config() instead of MemoryClient
  • Qdrant (local Docker) as the vector store
  • Ollama (llama3.1:latest) for LLM and (nomic-embed-text:latest) for embeddings
  • OpenAI SDK pointed at Ollama's /v1 endpoint for content rewriting

Key API differences handled:

  • MemoryClient() → Memory.from_config({...})
  • client.add() → memory.add() (same signature)
  • client.search(query, filters={"AND": [{"user_id": ...}, {"run_id": ...}]}) → memory.search(query, user_id=..., run_id=...) (explicit params instead of filter wrapping)
  • openai.chat.completions.create(model="gpt-4.1-nano") → ollama_chat.chat.completions.create(model="llama3.1:latest")

Includes installation section with pip install, Docker, and ollama pull commands, plus a note about swappable embedding models.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactor (no functional changes)
  • Documentation update

Breaking Changes

N/A

Test Coverage

  • I added/updated unit tests
  • I added/updated integration tests
  • I tested manually (describe below)
  • No tests needed (explain why)

Tested the OSS cookbook code end-to-end locally with Ollama + Qdrant:

  1. Memory.from_config() initialized successfully with Qdrant + Ollama providers
  2. memory.add() extracted and stored 6 writing preference memories
  3. memory.search() retrieved all 6 preferences correctly
  4. Ollama rewrote a sample document applying the stored preferences (headings, bullet points, statistics, no jargon)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have added tests that prove my fix/feature works
  • New and existing tests pass locally
  • I have updated documentation if needed

@mintlify
Copy link
Copy Markdown
Contributor

mintlify bot commented Mar 27, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mem0 🟢 Ready View Preview Mar 27, 2026, 11:48 AM

@whysosaket whysosaket merged commit ae8e03c into main Mar 28, 2026
4 checks passed
@whysosaket whysosaket deleted the feat/oss-content-writing-cookbook branch March 28, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants