createAIModel static method

Future<AIModel> createAIModel(
  1. AiModelType type,
  2. String apiKey
)

Implementation

static Future<AIModel> createAIModel(AiModelType type, String apiKey) async {
  final model = AiProviderRegistry.specFor(type).create();
  model.apiKey = apiKey;
  return model;
}