Skip to content

🚀 [firebase_ai] FirebaseAI.googleAI() Does not support generating images #17449

Open
@xiaojianli

Description

@xiaojianli

When using FirebaseAI.googleAI(), the api can return data normally, but the library does not support parsing.

Checking the code, I found that the inlineData data was not parsed and an exception was thrown directly.

  return switch (jsonObject) {
    {'text': final String text} => TextPart(text),
    {
      'functionCall': {
        'name': final String name,
        'args': final Map<String, Object?> args
      }
    } =>
      FunctionCall(name, args),
    {
      'functionResponse': {'name': String _, 'response': Map<String, Object?> _}
    } =>
      throw UnimplementedError('FunctionResponse part not yet supported'),
    {'inlineData': {'mimeType': String _, 'data': String _}} =>
      throw UnimplementedError('inlineData content part not yet supported'),
    _ => throw unhandledFormat('Part', jsonObject),
  };
}```


Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs AttentionThis issue needs maintainer attention.plugin: ailabel issues for firebase_ai plugintype: enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions