Repository navigation
feat: OpenAI-compatible text embeddings plugin - #94
openvoiceos-bot wants to merge 1 commit into
Conversation
ovos-openai-embeddings-plugin is a TextEmbedder for any server with an OpenAI-compatible /v1/embeddings endpoint. get_embeddings_batch sends one request for each batch_size texts and returns the vectors in input order, sorted by each item's index. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Checking back in with the latest test results. 📡I've aggregated the results of the automated checks for this PR below. 📊 CoverageDiving deep into the code to see what's covered! 🤿 ✅ 90.0% total coverage Per-file coverage (9 files)
Full report: download the 🔍 LintI've finished the digital walk-through of your PR. 🚶♂️ ❌ ruff: issues found in 20 file(s) — see job log ⚖️ License CheckEverything looks good on the legal front. ✅ ✅ No license violations found. Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed. 🔌 Skill Tests (ovoscope)I've checked the skill's 'privacy' (aka data handling). 🔒 ✅ 3/3 passed ✅ TestOpenAIPerSessionMemory — 1/1 🚌 Bus CoverageQuantifying the thoroughness of our end-to-end signal tracking. 🧮 Closing the loop on this automated check ♻️ |
What changes
A new plugin,
ovos-openai-embeddings-plugin(opm.embeddings.text), turns text into vectors through any OpenAI-compatible/v1/embeddingsendpoint, such as OpenAI, Ollama, llama.cpp, vLLM, LiteLLM or ovos-persona-server.get_embeddings_batch(texts)batch_sizetexts (default 128). The vectors come back in input order, sorted by each item'sindexget_embeddings(text)api_url,model(required),key,dimensions,batch_size,timeoutRuntimeErrornumpybecomes a dependency, because the vectors arefloat32arrays. It is theEmbeddingsArraytype of the plugin manager.On a plugin manager without
TextEmbedder.get_embeddings_batch, which OpenVoiceOS/ovos-plugin-manager#472 adds, the method still exists on this class.Evidence
/v1/embeddingsshapeindexsort removedopenaiSDK (3.36.1)CreateEmbeddingResponsecreate()takes the sameinput,modelanddimensionsNot run against a live embeddings server: no server was running on the machine.
🤖 Generated with Claude Code