Новый раг

This commit is contained in:
2026-03-01 14:21:33 +03:00
parent 2728c07ba9
commit 1ef0b4d68c
95 changed files with 3145 additions and 927 deletions

View File

@@ -0,0 +1,18 @@
from __future__ import annotations
from pathlib import PurePosixPath
from app.modules.rag.contracts import DocKind
class DocsClassifier:
def classify(self, path: str) -> str:
upper = PurePosixPath(path).name.upper()
lowered = path.lower()
if "runbook" in lowered or upper.startswith("RUNBOOK"):
return DocKind.RUNBOOK
if upper.startswith("README"):
return DocKind.README
if "spec" in lowered or "architecture" in lowered:
return DocKind.SPEC
return DocKind.MISC