-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
Needs AttentionThis issue needs maintainer attention.This issue needs maintainer attention.plugin: ailabel issues for firebase_ai pluginlabel issues for firebase_ai plugintype: enhancementNew feature or requestNew feature or request
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.
Part _parsePart(Object? jsonObject) {
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
Labels
Needs AttentionThis issue needs maintainer attention.This issue needs maintainer attention.plugin: ailabel issues for firebase_ai pluginlabel issues for firebase_ai plugintype: enhancementNew feature or requestNew feature or request