fix error and get image from gallery

This commit is contained in:
Valentin CZERYBA 2024-07-20 20:22:57 +02:00
parent 43a90bccb4
commit 001f19f559

View File

@ -64,7 +64,9 @@ class DisplayPictureScreenState extends State<DisplayPictureScreen>
gemini
.textAndImage(
text: "What is this picture ?", images: [file.readAsBytesSync()])
text: "What is this picture ?",
images: [file.readAsBytesSync()],
modelName: "models/gemini-1.5-flash-latest")
.then((value) => showDescImageAddDialog(
context, value?.content?.parts?.last.text ?? ''))
.catchError((e) => print("problem gemini : ${e}"));