mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-03 13:19:58 -05:00
ai: help-docs search — Help mode tools
Search the wrolpi-help markdown in-process: files are parsed on demand and cached by mtime; title matches outrank headings outrank body. No database table — the corpus is dozens of small files. Pages are read as paged markdown. The docker api container gets a read-only bind mount of the help docs at the native /opt/wrolpi-help location; a missing help directory degrades to empty results with a message. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
da5f55c956
commit
0f7c0d4d71
5 changed files with 318 additions and 1 deletions
|
|
@ -49,6 +49,12 @@ class AIZimSearchRequest:
|
|||
offset: int = 0
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class AIHelpSearchRequest:
|
||||
search_str: Optional[str] = None
|
||||
limit: int = 5
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class AISearchResponse:
|
||||
results: list = dataclasses.field(default_factory=list)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue