I cant delete an assistants file from the normal
client.files.retrieve('file-ogYYFc3EHBSbSqE3EgjLq7iW')
output:
FileObject(id=‘file-ogYYFc3EHBSbSqE3EgjLq7iW’, bytes=395850, created_at=1699352854, filename=‘EU2320735_20230302_XS2566031444_Decentia-USD-COBA Memory-48M-.RUT+.STOXX-Final.pdf’, object=‘file’, purpose=‘assistants’, status=‘processed’, status_details=None)
client.files.delete('file-ogYYFc3EHBSbSqE3EgjLq7iW')
error:
NotFoundError: Error code: 404 - {‘error’: {‘message’: ‘No such File object: file-ogYYFc3EHBSbSqE3EgjLq7iW’, ‘type’: ‘invalid_request_error’, ‘param’: ‘id’, ‘code’: None}}
Its with purpouse: assistants
so in therory i should delete it like this:
client.beta.assistants.files.delete(
assistant_id="...",
file_id="file-ogYYFc3EHBSbSqE3EgjLq7iW"
)
but there is an error because i deleted the assistant before deleting its files.