Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bge-small Embedding Service (Render)

A minimal FastAPI service that embeds text with BAAI/bge-small-en-v1.5 using fastembed (ONNX Runtime),

Deploy

  1. Push this folder to its own GitHub repo (or a subfolder Render can target with a custom root directory).
  2. On Render, New → Blueprint, point it at the repo — render.yaml here defines everything. Or New → Web Service manually with:
    • Runtime: Python 3
    • Build command: pip install -r requirements.txt
    • Start command: uvicorn main:app --host 0.0.0.0 --port $PORT
    • Plan: Free
  3. Render auto-generates EMBEDDING_API_KEY (see render.yaml) — copy it from the service's Environment tab. ( Not enablesd now )
  4. In your RAG backend, set:
    EMBEDDING_URLS=https://your-service1.onrender.com,https://your-service2.onrender.com,https://your-service3.onrender.com
    EMBEDDING_API_KEY=<the generated key>
    USE_LOCAL_FALLBACK=false
    

API

POST /embed
{ "texts": ["some text", "more text"] }
→ { "embeddings": [[...], [...]], "model": "bge-small-en-v1.5" }

GET /health
→ { "status": "ok", "model": "bge-small-en-v1.5" }

Auth: send X-API-Key: <EMBEDDING_API_KEY> on every request. If EMBEDDING_API_KEY is unset, auth is skipped (fine for local dev, not for a public Render URL).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages