testModel method
Implementation
Future<void> testModel() async {
final model = selectedModel.value;
if (model == null) return;
isTesting.value = true;
testResult.value = null;
testError.value = null;
try {
final result = await _ollama.chat(
model,
'Introduce yourself in one sentence: what model are you and what can you do?',
);
testResult.value = result;
} catch (e) {
testError.value = e.toString().replaceFirst('Exception: ', '');
}
isTesting.value = false;
}