INNER CODE UNIT · Python

chat_loop

yifanfeng97/Hyper-Extract · hyperextract/cli/cli.py:1106

def chat_loop(
    ka,
    ka_path: str,
    top_k: int = 3,
    source_ids: list[str] | None = None,
    tags: list[str] | None = None,
):
    """Interactive chat loop."""
    console.print(
        "\n[bold green]Entering interactive mode. Type 'exit' or 'quit' to stop.[/bold green]\n"
    )
    while True:
        try:
            query = console.input("[bold cyan]>[/bold cyan] ")
            if query.lower() in ["exit", "quit", "q"]:
                console.print("\n[dim]Goodbye![/dim]")
                console.print()
                console.print("[dim]Other useful commands:[/dim]")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…