Skip to content

prism-416/prism-vector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prism-vector

Cloud-agnostic serverless template for document chunking, Gemini embedding, and pgvector upsert.

Why this template

  • Core vector pipeline is independent from cloud providers.
  • Entry points are split into provider adapters (AWS/GCP/Azure/OCI).
  • Domain customization is isolated via domain adapter registry.
  • Package management is standardized with uv.

Project layout

src/
├─ entrypoints/
│  ├─ handler.py                  # Cloud-agnostic core request handler
│  ├─ lambda_handler.py           # Backward-compatible AWS alias
│  └─ providers/
│     ├─ aws_lambda.py
│     ├─ gcp_http.py
│     ├─ azure_function.py
│     └─ oci_function.py
├─ pipelines/
├─ models/
├─ services/
├─ chunkers/
├─ embedders/
├─ repositories/
├─ db/
└─ utils/

Package management with uv

uv sync

Optional cloud adapter dependencies:

uv sync --extra gcp
uv sync --extra azure
uv sync --extra oci

Environment

  1. Copy .env.example to .env
  2. Fill Gemini and Postgres values

Domain template usage

  1. Copy src/models/domain_template.py adapter
  2. Set a unique key (for example: legal-doc, support-ticket)
  3. Register adapter in VectorUpsertPipeline (self._domains.register(...))
  4. Send request with matching domain

This keeps domain logic isolated so the same template works across projects.

Provider entry points

  • AWS Lambda: src.entrypoints.providers.aws_lambda.handler
  • Google Cloud Functions: src.entrypoints.providers.gcp_http.handler
  • Azure Functions: src.entrypoints.providers.azure_function.main
  • Oracle Cloud Functions: src.entrypoints.providers.oci_function.handler

All adapters call src.entrypoints.handler.handle_payload, so business logic remains provider-neutral.

About

Event driven worker for Vector DB related jobs in Prism

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors