promptToChooseBackend function
Parses value into a CreateBackend choice.
Defaults to gemini-api when value is null.
Implementation
CreateBackend promptToChooseBackend({String? value}) {
switch ((value ?? 'gemini-api').toLowerCase()) {
case 'gemini-api':
case 'gemini':
return CreateBackend.geminiApi;
case 'vertex-ai':
case 'vertex':
return CreateBackend.vertexAi;
default:
throw ArgumentError('Unsupported backend: $value');
}
}