Open
Description
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),
};
}```