Thanks for providing the code snippets!
To summarise your point: it’s recommended to use the file upload and then reference the file_id
in the message for the Assistant.
Did you try using your create_image_content
method with the Assistant API?
I use similar methods to preprocess and encode the image, but it only works for the Chat API.