When do you use assistant file object vs message file object?
In order to ask assistant to do something with certain files, I need to include all the necessary files in the message. It doesn’t seem to be able to reference files attached to the assistant that the message is running inside.
Thanks!
This response is just based on some very limited testing via Playground, where I wanted to have some per Assistant files that were not message specific but then have some additional files that were message specific.
This didn’t seem to work for me.
If I sent a message without files it would seem to use the Assistant files.
But if I also attached files to the message it seemed to only use the message files.
I was confused about this as well. It seemed counter-intuitive to me to attach files to an assistant and then need to explicitly tell the assistant to reference those files in a message. Due to my confusion I asked GPT about it. We had a long back and forth conversation where he explained that in order to reference a file I needed to include the file in the file_ids property of the message object. BUT, both GPT and I realized during the conversation that he was “unaware” of the ability to attach files to an assistant. His understanding was that files just lived out there on the OpenAI Server associated with an account and NOT any particular assistant. GPT said that this functionality must have been added since his last training session.
So I am now convinced that the file_ids property on the message object is a vestige of a version of the API before files could be directly associated with Assistants. Although, I believe it could still be useful to, as martin10 described, instruct an assistant by saying “hey, out of the X number of files you have at your disposal, I want you to use this and only this one to respond to this message”. It could also be useful in referencing files that are on your account, but not explicitly attached to the assistant.