in src/dfcx_scrapi/core/search.py [0:0]
def search_doc_id(
self,
document_id: str,
datastore_id: str = None,
docs: Optional[List[Document]] = None
) -> List[str]:
if not docs and not datastore_id:
raise ValueError("Must provide either `docs` or `datastore_id`")
elif not docs and datastore_id:
docs = self.list_documents(datastore_id)
doc_found = False
for doc in docs:
if doc.parent_document_id == document_id:
doc_found = True
print(doc)
break
if not doc_found:
print(f"Document not found for Doc ID: `{document_id}`")