INNER CODE UNIT · Python
talk
yifanfeng97/Hyper-Extract · hyperextract/cli/cli.py:1211
def talk(
ka_path: str = typer.Argument(..., help="Knowledge Abstract directory"),
query: str | None = typer.Option(None, "--query", "-q", help="Question to ask"),
top_k: int = typer.Option(3, "--top-k", "-n", help="Number of context items"),
interactive: bool = typer.Option(
False, "--interactive", "-i", help="Interactive mode"
),
source: list[str] | None = typer.Option(
None, "--source", help="Scope: only knowledge from these source documents"
),
tag: list[str] | None = typer.Option(
None, "--tag", help="Scope: only knowledge from sources carrying these tags"
),
):
"""Chat with Knowledge Abstract."""
logger.info(
"command=talk ka_path=%s query=%s interactive=%s",
ka_path,