用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/QinghongLin/data2story-skill --skill openrouter-embeddings命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | openrouter-embeddings |
| description | Generate text embeddings via OpenRouter using Qwen3-Embedding-8B. |
Text → embedding vector via OpenRouter. Default model: qwen/qwen3-embedding-8b.
Resolve TOOL_DIR = the directory containing this SKILL.md. Commands below use TOOL_DIR as a symbolic placeholder; replace it with the resolved, quoted path before running Bash.
export OPENROUTER_API_KEY=sk-or-v1-...
python3 TOOL_DIR/scripts/embed.py \
--text "The quick brown fox jumps over the lazy dog" \
--output vec.json
Input records.jsonl (one JSON per line):
{"id": "row_0", "text": "Every place name in the United States."}
{"id": "row_1", "text": "Nearby stars and potential exoplanets."}
Run:
python3 TOOL_DIR/scripts/embed.py \
--jsonl records.jsonl \
--output records_with_embeddings.jsonl \
--batch-size 32
Output is the same JSONL with an added embedding field per line.
| Flag | Default | Description |
|---|---|---|
--text | — | Embed one string (mutually exclusive with --jsonl) |
--jsonl | — | Embed many; each line must have a text field |
--output | required | Output path |
--model | qwen/qwen3-embedding-8b | Any embedding model on OpenRouter |
--batch-size | 32 | Records per API call (jsonl mode) |
--dimensions | — | Optional: truncate to N dims if supported |
POST /api/v1/embeddings — OpenAI-compatible schema.
Request:
{ "model": "qwen/qwen3-embedding-8b", "input": ["text1", "text2", ...] }
Response:
{ "data": [ { "embedding": [0.01, -0.02, ...], "index": 0 }, ... ], "model": "...", "usage": {...} }
qwen3-embedding-8b outputs high-dimensional dense vectors suitable for semantic similarity, clustering, RAG.qwen/qwen3-embedding-4b or other listed embedding models (GET /api/v1/embeddings/models).基于 SOC 职业分类