|
@@ -93,6 +93,16 @@ class R2R:
|
|
|
print(search_response.results)
|
|
|
return search_response.results.chunk_search_results
|
|
|
|
|
|
+ def ingest_file_sync(self, file_path: str, metadata: Optional[dict]):
|
|
|
+ client = self._check_login_sync()
|
|
|
+ return client.documents.create(
|
|
|
+ file_path=file_path,
|
|
|
+ metadata=metadata if metadata else None,
|
|
|
+ ingestion_mode="fast",
|
|
|
+ id=None,
|
|
|
+ run_with_orchestration=False,
|
|
|
+ )
|
|
|
+
|
|
|
def list_chunks(self, ids: list[str] = []):
|
|
|
client = self._check_login_sync()
|
|
|
print(
|