Skip to content

dotaclover/embeding-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ACFlow Embedding Service

OpenAI-compatible local embedding service using BGE-small-zh-v1.5 model.

Quick Start

`�ash

Install dependencies

pip install -r requirements.txt

Download model (uses Chinese mirror)

python download_model.py

Start server

python server.py `

Server runs at http://127.0.0.1:9092

API Usage

Health Check

�ash curl http://localhost:9092/health

Generate Embedding

�ash curl http://localhost:9092/v1/embeddings -H "Content-Type: application/json" -d '{"input": "hello world", "model": "bge-small-zh-v1.5"}'

Python Example

`python import requests

response = requests.post( "http://127.0.0.1:9092/v1/embeddings", json={"input": "hello", "model": "bge-small-zh-v1.5"} )

vector = response.json()["data"][0]["embedding"] print(f"Dimensions: {len(vector)}") # 512 `

Model Info

  • Model: BAAI/bge-small-zh-v1.5
  • Dimensions: 512
  • Size: ~90 MB
  • Optimized for Chinese text

Files

  • server.py - FastAPI server
  • download_model.py - Model downloader with Chinese mirror

equirements.txt - Python dependencies

  • Dockerfile - Docker image
  • wheels/ - Offline Python packages (~200MB)

License

MIT License

About

a simple embeding demo

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors