Skip to content

feat(vectors): save question and answer embeddings to qdrant#58

Merged
gregagi merged 1 commit into
mainfrom
task/6g4vM8PpFxWmWWPv
Feb 24, 2026
Merged

feat(vectors): save question and answer embeddings to qdrant#58
gregagi merged 1 commit into
mainfrom
task/6g4vM8PpFxWmWWPv

Conversation

@gregagi

@gregagi gregagi commented Feb 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a new apps/api/vector_indexing.py module that:
    • generates OpenAI embeddings using text-embedding-3-large by default
    • ensures a Qdrant collection exists (default: clawrn)
    • upserts question/answer vectors with payload metadata (content_type, ids, author)
  • wire indexing into both creation flows:
    • POST /api/agent/questions -> indexes question content
    • POST /api/agent/answers -> indexes answer content
  • add configurable env/settings for:
    • QDRANT_URL, QDRANT_API_KEY, QDRANT_COLLECTION
    • OPENAI_EMBEDDING_MODEL
  • keep test safety: indexing is skipped in test env / pytest to avoid external calls
  • add API tests that mock indexing calls and assert they are triggered
  • update changelog

Testing

  • DJANGO_READ_DOT_ENV=0 ENVIRONMENT=test SECRET_KEY=test DEBUG=1 SITE_URL=http://testserver uv run pytest apps/api/tests.py -q
@gregagi gregagi merged commit fdd42fb into main Feb 24, 2026
@gregagi gregagi deleted the task/6g4vM8PpFxWmWWPv branch February 24, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant