getModel static method
Returns the model metadata from groq with the given model id
Implementation
static Future<GroqLLMModel> getModel(String modelId, String apiKey) async {
final response =
await AuthHttp.get(url: '$_getModelBaseUrl/$modelId', apiKey: apiKey);
if (response.statusCode == 200) {
return GroqParser.llmModelFromJson(
json.decode(utf8.decode(response.bodyBytes, allowMalformed: true)));
} else {
throw GroqException.fromResponse(response);
}
}