End-to-end demo using the bundled mock providers (no credentials needed).
()
| 385 | if topic_index_dir: |
| 386 | args.extend(["--topic-index-dir", str(topic_index_dir)]) |
| 387 | if no_topic_index: |
| 388 | args.append("--no-topic-index") |
| 389 | if json_output: |
| 390 | args.append("--json") |
| 391 | raise typer.Exit(code=_run_wiki(*args)) |
| 392 | |
| 393 | |
| 394 | @app.command() |
| 395 | def demo() -> None: |
| 396 | """End-to-end demo using the bundled mock providers (no credentials needed).""" |
| 397 | os.environ.setdefault("PAPERFLOW_LLM_PROVIDER", "mock") |
| 398 | os.environ.setdefault("PAPERFLOW_EMBED_PROVIDER", "hash") |
| 399 | |
| 400 | config = load_provider_config() |
| 401 | typer.echo("PaperFlow demo (deterministic, offline)") |
| 402 | typer.echo(f"Providers: {config.describe()}") |
| 403 | |
| 404 | llm = build_llm_provider(config) |
| 405 | embed = build_embedding_provider(config) |
| 406 | |
| 407 | response = llm.generate( |
| 408 | "Summarize PaperFlow in one sentence.", |
| 409 | system="You are a concise research assistant.", |
| 410 | ) |
| 411 | typer.echo(f"\n[llm:{llm.name}:{llm.model}] {response.text}") |
| 412 | |
| 413 | sample_texts = [ |
| 414 | "Personalized paper recommendation with interest drift.", |
| 415 | "Multi-modal foundation models for scientific discovery.", |
| 416 | "Reinforcement learning from human feedback.", |
| 417 | ] |
nothing calls this directly
no test coverage detected