Error "no implicit conversion of Array into String" when using Gemini AI analysis on posts with images

Hi everyone,

I’ve encountered an issue while using the Discourse AI plugin with Gemini integration. When I try to analyze posts that contain images, I get the following error message:

no implicit conversion of Array into String

What happens

  • If the post only contains text, everything works as expected.
  • If the post includes an image , the analysis fails with this error.

Environment

Installed 3.5.0.beta8-dev (70dbb95041)

Thanks for your help!

1 Like

When I include an image in a public post, Gemini returns no reply,

when I send it via private message, the AI reports the error shown above.

The same behavior occurs across multiple AI models.

Only the default “creative” bot produces the above error; other custom AI bot can successfully recognize the image and respond normally.

I’m running into the same issue. Text-only posts work fine, but if there’s an image in the post, I get the same “no implicit conversion of Array into String” error.

From the error message, it seems like something in the image data is confusing the plugin or Gemini. Maybe it’s sending the image info in a way that the API doesn’t expect.

Good to know it only happens with certain bots. Hopefully, this gets sorted out soon.