classifiers.init_tool_embeddings module
Initialize tool embeddings in Redis.
Reads tool definitions and their synthetic queries from
tool_index_data.json, computes centroid embeddings via the
OpenRouter API, and stores them in Redis hashes for fast
vector-based tool selection at runtime.
Usage:
python -m classifiers.init_tool_embeddings [--force]
- Environment variables:
OPENROUTER_API_KEY – required REDIS_URL – defaults to redis://localhost:6379/0