|
@@ -121,7 +121,7 @@ class R2RFileService(OSSFileService):
|
|
|
r2r.search(query, filters={"file_key": {"$in": file_keys}})
|
|
|
)
|
|
|
"""
|
|
|
- r2r.init_sync()
|
|
|
+ # r2r.init_sync()
|
|
|
search_results = r2r.search(query, filters=filters)
|
|
|
|
|
|
if not search_results:
|
|
@@ -154,7 +154,7 @@ class R2RFileService(OSSFileService):
|
|
|
asyncio.run(r2r.init())
|
|
|
list_results = asyncio.run(r2r.list(ids=ids, offset=offset, limit=limit))
|
|
|
"""
|
|
|
- r2r.init_sync()
|
|
|
+ # r2r.init_sync()
|
|
|
list_results = r2r.list(ids=ids, offset=offset, limit=limit)
|
|
|
return list_results
|
|
|
|
|
@@ -175,14 +175,14 @@ class R2RFileService(OSSFileService):
|
|
|
r2r.list_documents(id=id, offset=offset, limit=limit)
|
|
|
)
|
|
|
"""
|
|
|
- r2r.init_sync()
|
|
|
+ # r2r.init_sync()
|
|
|
list_results = r2r.list_documents(id=id, offset=offset, limit=limit)
|
|
|
return list_results
|
|
|
|
|
|
@staticmethod
|
|
|
def list_chunks(ids: list[str]) -> dict:
|
|
|
if len(ids) > 0:
|
|
|
- r2r.init_sync()
|
|
|
+ # r2r.init_sync()
|
|
|
list_results = r2r.list_chunks(ids=ids)
|
|
|
|
|
|
files = {}
|