window.openai.uploadFile and setWidgetState and imageIds

Hi all,

I have a simple mcp server with 1 tool that invoked will display a file chooser in a widget. Trying to get the model to “see” the image that the user uploads.

After the user selects an image to upload I call

const uploadResult = await window.openai.uploadFile(file);

then

    window.openai.setWidgetState({
      modelContent: "Check out the latest updated image",
      privateContent: {},
      imageIds: [uploadedFileId],
    });

then

   await window.openai.sendFollowUpMessage({
     prompt: 'Please describe what you see.',
    });

The response has nothing to do with the image the user uploaded.

Trying to follow the docs that mention state management and image ids. For some reason it won’t let me include links

1 Like

I have the same issue. If someone from @OpenAI_Support could indicate how the file feature is supposed to work that would be great. Doc says that the model should be able to see images referenced in imageIds, this is not the case.