feat: embedding service — Cloudflare Worker + KV cache + Dashscope

- POST /embed: batch text → vector (max 100)
- KV cache: sha256(model+text), content-addressable, no expiry
- Dashscope text-embedding-v3 upstream (1024 dims)
- Bearer token auth
- Health endpoint

Deployed: https://embed.shazhou.workers.dev
This commit is contained in:
2026-04-29 07:21:46 +00:00
parent 1d225ed171
commit 396e005686
9 changed files with 2254 additions and 2 deletions
+14
View File
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "bundler",
"strict": true,
"noUncheckedIndexedAccess": true,
"skipLibCheck": true,
"types": ["@cloudflare/workers-types"],
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"]
}