ask method
Implementation
@override
Future<String?> ask({
required String prompt,
}) async {
try {
GenerateContentResponse generateContentResponse = await generativeModel.generateContent(
[
Content.text(prompt),
],
);
return generateContentResponse.text;
} catch (e) {
return null;
}
}