无法检索已上载文件的内容。
请建议出了什么问题?我已经尝试了每种类型的文件:搜索、分类、答案和微调。文件上传成功,但在检索内容时显示错误。
import openai
openai.api_key = "sk-bbjsjdjsdksbndsndksbdksbknsndksd" # this is wrong key
# Replace file_id with the file's id whose file content is required
content = openai.File.download("file-5Xs86wEDO5gx8fOitMYArV8r")
print(content)
错误:
Traceback (most recent call last):
File "main.py", line 6, in <module>
content = openai.File.download("file-5Xs86wEDO5gx8fOitMYArV8r")
File "/usr/local/lib/python3.8/dist-packages/openai/api_resources/file.py", line 61, in download
raise requestor.handle_error_response(
openai.error.InvalidRequestError: Not allowed to download files of purpose: classifications
1条答案
按热度按时间nwlqm0z11#
来自OpenAI社区的回答
当前,我们仅允许下载微调运行的结果,不允许下载微调运行的输入文件。我们也不允许下载与搜索相关的文件。↗️