Skip to content

Commit e86e9a0

Browse files
unamedkrclaude
andcommitted
fix(ci): mypy error — Engine.aingest_text does not exist
CLI demo ingest used non-existent aingest_text method. Replace with engine.ingest() via temp file. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 200310d commit e86e9a0

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

quantumrag/cli/main.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -576,17 +576,17 @@ def demo(
576576
cfg = QuantumRAGConfig.auto(storage={"data_dir": str(demo_dir)})
577577
engine = Engine(config=cfg)
578578

579-
# Ingest built-in demo text
580-
try:
581-
result = asyncio.get_event_loop().run_until_complete(
582-
engine.aingest_text(_DEMO_TEXT, title="QuantumRAG Overview", mode="fast")
583-
)
584-
except RuntimeError:
585-
result = asyncio.run(
586-
engine.aingest_text(_DEMO_TEXT, title="QuantumRAG Overview", mode="fast")
587-
)
579+
# Ingest built-in demo text via temp file
580+
import tempfile
588581

589-
console.print(f" [green]Done:[/green] {result.get('chunks', 0)} chunks indexed")
582+
with tempfile.NamedTemporaryFile(mode="w", suffix=".md", delete=False, encoding="utf-8") as f:
583+
f.write(_DEMO_TEXT)
584+
demo_path = f.name
585+
try:
586+
result = engine.ingest(demo_path, mode="fast")
587+
console.print(f" [green]Done:[/green] {result.chunks} chunks indexed")
588+
finally:
589+
Path(demo_path).unlink(missing_ok=True)
590590
console.print(f" Open [bold cyan]http://localhost:{port}[/bold cyan] to try it!")
591591
console.print(" [dim]Try: 'What is QuantumRAG?' or 'What formats are supported?'[/dim]")
592592

0 commit comments

Comments
 (0)