diff --git a/src/haiku/rag/app.py b/src/haiku/rag/app.py index 0e2d1822..590966db 100644 --- a/src/haiku/rag/app.py +++ b/src/haiku/rag/app.py @@ -32,9 +32,9 @@ class HaikuRAGApp: f"[b]Document with id [cyan]{doc.id}[/cyan] added successfully.[/b]" ) - async def add_document_from_source(self, file_path: Path): + async def add_document_from_source(self, source: str): async with HaikuRAG(db_path=self.db_path) as self.client: - doc = await self.client.create_document_from_source(file_path) + doc = await self.client.create_document_from_source(source) self._rich_print_document(doc, truncate=True) self.console.print( f"[b]Document with id [cyan]{doc.id}[/cyan] added successfully.[/b]" diff --git a/src/haiku/rag/cli.py b/src/haiku/rag/cli.py index ae377b1c..8855d888 100644 --- a/src/haiku/rag/cli.py +++ b/src/haiku/rag/cli.py @@ -81,7 +81,7 @@ def add_document_text( @cli.command("add-src", help="Add a document from a file path or URL") def add_document_src( - file_path: Path = typer.Argument( + source: str = typer.Argument( help="The file path or URL of the document to add", ), db: Path = typer.Option( @@ -91,7 +91,7 @@ def add_document_src( ), ): app = HaikuRAGApp(db_path=db) - asyncio.run(app.add_document_from_source(file_path=file_path)) + asyncio.run(app.add_document_from_source(source=source)) @cli.command("get", help="Get and display a document by its ID")