classifiers.refresh_tool_embeddings module
Refresh embeddings for tools whose descriptions have changed.
Compares each registered tool’s live description against the stored metadata in Redis. Tools with mismatched descriptions are “stale” and get their synthetic queries regenerated, re-embedded, and overwritten in Redis.
Run python -m classifiers.refresh_tool_embeddings (see --help) with
optional arguments:
--force— Re-embed every tool regardless of whether its description changed (useful after switching embedding models).--tools— Comma-separated list of specific tool names to refresh.--tools-dir— Tool scripts directory (default:tools).
- async classifiers.refresh_tool_embeddings.find_stale_tools(registered, redis_client)[source]
Return names of tools whose descriptions differ from Redis.