Hello.
I noticed that Assistants API finally supports vision capabilities now.
I upload images using Files API:
const file = await openai.files.create({
purpose: 'vision',
file: await fetch(url)
})
And use file.id
as a reference in Assistant messages:
await openai.beta.threads.messages.create(thread.id, {
content: [{
type: 'image_file',
image_file: {
file_id: file.id,
},
}],
role: 'user',
})
But I don’t understand how to set up an expiration policy. I want images to delete automatically after some time (7 days, for example) or if there are no references in threads, for example, when a message with this file_id
becomes out of the scope of a thread’s context windows.
I tried to delete an image manually, but the thread failed to run after that.
I can’t even change the contents of a message because the modifyMessage
method only allows updating the metadata.
And what’s the pricing for File storage for such images? I only see pricing for Vector Storage.