getLlmSubjectQuota method

Future<LlmQuotaState> getLlmSubjectQuota(
  1. String projectId,
  2. LlmQuotaSubjectType subjectType,
  3. String subjectId
)

Implementation

Future<LlmQuotaState> getLlmSubjectQuota(String projectId, LlmQuotaSubjectType subjectType, String subjectId) async {
  final response = await httpClient.get(_llmSubjectQuotaUri(projectId, subjectType, subjectId));
  if (response.statusCode >= 400) {
    throw MeshagentException('Failed to get LLM subject quota. Status code: ${response.statusCode}, body: ${response.body}');
  }
  return LlmQuotaState.fromJson(jsonDecode(response.body) as Map<String, dynamic>);
}