Since yesterday I’m trying to use uploaded files via code interpreter, but can’t get it to work with assistants API v2.
I adhere to the docs: https://platform.openai.com/docs/api-reference/messages
with open(tmp_file_path, "rb") as file:
uploaded_file = client.files.create(file=file, purpose="assistants")
attachments.append(
{
"file_id": uploaded_file.id,
"tools": [{"type": "code_interpreter"}],
}
)
attachments
is later added to the assistants message.
The file is shown as successfully uploaded in the UI:
The assistant can correctly use tools like duckduckgo, custom tools, and I can download files created via code interpreter.
But when I upload a file and ask something about it, I always receive something along these lines as an answer: I can't find the file with this path
Is anybody else able to upload files to code interpreter using the v2 api?
OS: Ubuntu
OpenAI python SDK version: openai-1.30.4