INNER CODE UNIT · Python
delete_file
aws-samples/rag-using-langchain-amazon-bedrock-and-opensearch · utils/dataset.py:60
def delete_file(file_path):
logger.info(f"Deleting file {file_path}")
try:
os.remove(file_path)
except Exception as e:
logger.error(e)