Skip to content

Receiving image #165

@NoxArt

Description

@NoxArt

Hello,
I am trying the snippet used here https://github.com/google-gemini-php/client?tab=readme-ov-file#text-and-video-input

My goal is to supply an image, have Gemini modify it and send it to me back

However I only receive text

  • If I call ->text() first then I receive text result and all other fields, mainly inlineData, are NULL ... the texts cheerfully says that yes, Gemini modified the image and it is here
  • If I call ->parts() first then I get error "'The GenerateContentResponse::parts() quick accessor only works for a single candidate, but none were returned. Check the GenerateContentResponse::$promptFeedback to see if the prompt was blocked." ... $promptFeedback is NULL

It only has usageMetadata, modelVersion and responseId (model is "gemini-2.0-flash")

Can you please advise?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions