feat: семантический поиск расценок ГЭСН (Уровень 1)

- ai/embeddings.py: генерация embedding через OpenAI API, FAISS индекс
- ai/search.py: GESNSearch — cosine similarity, фильтр по сборнику
- CLI: smeta build-index, smeta search "описание работ"
- pyproject.toml: optional deps [ai] = faiss-cpu + openai

Для работы нужен OPENAI_API_KEY (embedding text-embedding-3-small)
Индекс строится один раз, поиск — локальный через FAISS

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
anor
2026-03-22 15:54:02 +10:00
co-authored by Claude Opus 4.6
parent 2cec7255c8
commit 4c244f4e6c
5 changed files with 312 additions and 0 deletions
+1
View File
@@ -16,6 +16,7 @@ dependencies = [
[project.optional-dependencies]
dev = ["pytest>=8.0"]
ai = ["faiss-cpu>=1.7", "openai>=1.0"]
[project.scripts]
smeta = "smeta_railway.cli:app"