createAIModel static method
Create an AI Model based on the type and API key
Implementation
static Future<AIModel> createAIModel(
AiModelType aiModelType,
String apiKey,
) async {
AIModel aiModel;
if (aiModelType == AiModelType.gemini) {
GeminiAI gAI = GeminiAI();
gAI.setApiKey(apiKey);
aiModel = gAI;
} else {
throw Exception('Invalid AI Model Type');
}
return aiModel;
}