Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompting with Image Not Working as Expected #85

Closed
recursivecodes opened this issue Mar 14, 2025 · 2 comments
Closed

Prompting with Image Not Working as Expected #85

recursivecodes opened this issue Mar 14, 2025 · 2 comments

Comments

@recursivecodes
Copy link

Trying to prompt with an image, per the README - and no matter what type of image I send, I get a response that indicates that the model sees 'object Object' instead of the actual image data.

Ex:

The image "[object Object]" is a common placeholder in web development, particularly in JavaScript. It's a placeholder that represents an object variable that hasn't been assigned a specific value yet. 

....etc

I've tried HTMLVideoElement, VideoFrame and Blob, all produce similar results.

Image

Version 134.0.6998.89 (Official Build) (arm64)

@recursivecodes
Copy link
Author

My session is created as follows:

const options = {
  expectedInputs: [
    { type: "image" }
  ]
};
this.aiSession = await ai.languageModel.create({
  ...options,
  monitor(m) {
    m.addEventListener("downloadprogress", (e) => {
      console.log(`Downloaded ${e.loaded} of ${e.total} bytes.`);
      self.aiModelDownloadProgress = Math.round((e.loaded / e.total) * 10000) / 100;
      if (e.loaded === e.total) self.aiModelDownloadProgress = null;
    });
  }
});

@tomayac
Copy link
Contributor

tomayac commented Mar 14, 2025

Hi Todd,

The explainer is ahead of what's actually implemented in Chrome. We'll announce it on the early preview program once these APIs can be tested.

Cheers,
Tom

@domenic domenic closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants