We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I use the textAndImage method to get a response and the images are form the camera, I am not getting a response from Gemini.
ChatInputBox( controller: controller, onClickCamera: () async { showDialog( context: context, builder: ((context) { return AlertDialog( title: const Text('Image Selection'), content: const Text( 'Do you want to use your camera or select an image from the gallery?'), actions: [ TextButton( onPressed: () async { Navigator.pop(context); // Capture a photo. final XFile? photo = await picker.pickImage( source: ImageSource.camera); if (photo != null) { photo.readAsBytes().then((value) => setState(() { selectedImage = value; })); } }, child: const Text('Camera'), ), TextButton( onPressed: () async { Navigator.pop(context); // Capture a photo. final XFile? photo = await picker.pickImage( source: ImageSource.gallery); if (photo != null) { photo.readAsBytes().then((value) => setState(() { selectedImage = value; })); } }, child: const Text('Gallery'), ), ], ); })); }, onSend: () async { if (controller.text.isNotEmpty) { final searchedText = controller.text; if (selectedImage == null) { chats.add( Content(role: 'user', parts: [Parts(text: searchedText)])); controller.clear(); loading = true; gemini.chat(chats).then((value) { chats.add(Content( role: 'model', parts: [Parts(text: value?.output)])); loading = false; }); } else { chats.add( Content(role: 'user', parts: [Parts(text: searchedText)])); controller.clear(); loading = true; gemini.textAndImage( text: searchedText, images: [selectedImage!]).then((value) { chats.add(Content( role: 'model', parts: [Parts(text: value?.output)])); loading = false; selectedImage = null; }); } } }, ),
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I use the textAndImage method to get a response and the images are form the camera, I am not getting a response from Gemini.
The text was updated successfully, but these errors were encountered: