题意:通过OpenAI, Python删除文件
问题背景:
In order to test some OpenAI file functionalities (Answer, Search etc.), I created several files using python through the OpenAI API.
为了测试一些 OpenAI 文件功能(如回答、搜索等),我通过 OpenAI API 使用 Python 创建了几个文件。
As per OpenAI [files documentation][1] I am now trying to delete the file(s) I created as follows:
根据 OpenAI [文件文档][1],我现在尝试删除我创建的文件(s),具体操作如下:
openai.File("file-CQ0tfZ4p3Hihlbwi1tQYmZV2").delete()
the error I get is as follows:
我得到的错误如下:
TypeError: delete() missing 1 required positional argument: 'sid&