getAgentKnowledgeBase method

Future<GetAgentKnowledgeBaseResponse> getAgentKnowledgeBase({
  1. required String agentId,
  2. required String agentVersion,
  3. required String knowledgeBaseId,
})

Gets information about a knowledge base associated with an agent.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter agentId : The unique identifier of the agent with which the knowledge base is associated.

Parameter agentVersion : The version of the agent with which the knowledge base is associated.

Parameter knowledgeBaseId : The unique identifier of the knowledge base associated with the agent.

Implementation

Future<GetAgentKnowledgeBaseResponse> getAgentKnowledgeBase({
  required String agentId,
  required String agentVersion,
  required String knowledgeBaseId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/agents/${Uri.encodeComponent(agentId)}/agentversions/${Uri.encodeComponent(agentVersion)}/knowledgebases/${Uri.encodeComponent(knowledgeBaseId)}/',
    exceptionFnMap: _exceptionFns,
  );
  return GetAgentKnowledgeBaseResponse.fromJson(response);
}