mirror of
https://github.com/HKUDS/OpenSpace.git
synced 2026-10-16 04:28:08 +00:00
Both paths in search_skills/hybrid_search_skills now go through a shared SkillRanker singleton: - SkillSearchEngine._bm25_phase: previously instantiated a fresh SkillRanker per call, reloading the pickle cache each time. - hybrid_search_skills candidate loop: previously generated embeddings via generate_embedding on every query, ignoring the persistent cache entirely. The persistent pickle at .openspace/skill_embedding_cache/skill_embeddings_v1.pkl is reused across invocations and survives process restarts. Candidates without a stable skill_id are skipped to avoid cache key collisions. On a 28-skill local registry with text-embedding-3-small via OpenRouter, query latency drops from 8-14s to ~300ms after warm-up. Top-1 match identity is preserved on all test queries (score drift <0.001). Cloud candidates that already carry _embedding from the server-side search endpoint are skipped and unchanged. |
||
|---|---|---|
| .. | ||
| agents | ||
| cloud | ||
| communication | ||
| config | ||
| grounding | ||
| host_detection | ||
| host_skills | ||
| llm | ||
| local_server | ||
| platforms | ||
| prompts | ||
| recording | ||
| skill_engine | ||
| skills | ||
| utils | ||
| .env.example | ||
| __init__.py | ||
| __main__.py | ||
| dashboard_server.py | ||
| mcp_server.py | ||
| tool_layer.py | ||