Usage
Parameters
filename
(str): Filename of the document to delete
Returns
A dictionary containing information about the deletion operation:message
(str): A success message indicating the document was deleteddocument_id
(str): The ID of the deleted document- Additional fields may be present with more details about the operation
Description
This method is a convenience wrapper that:- Retrieves the document ID by filename using get_document_by_filename
- Deletes the document using delete_document
Multiple Documents with Same Filename
If multiple documents have the same filename, this method will delete the most recently updated one. To delete a specific document when duplicates exist, use delete_document with the exact document ID instead.Notes
- This operation requires appropriate permissions for the document.
- If no document exists with the specified filename, a
ValueError
will be raised. - Deleting a document that is part of an existing knowledge graph will not automatically update the graph. You may need to recreate or update the graph separately.