deleteAgentMemory method

Future<void> deleteAgentMemory({
  1. required String agentAliasId,
  2. required String agentId,
  3. String? memoryId,
  4. String? sessionId,
})

Deletes memory from the specified memory identifier.

May throw AccessDeniedException. May throw BadGatewayException. May throw ConflictException. May throw DependencyFailedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter agentAliasId : The unique identifier of an alias of an agent.

Parameter agentId : The unique identifier of the agent to which the alias belongs.

Parameter memoryId : The unique identifier of the memory.

Parameter sessionId : The unique session identifier of the memory.

Implementation

Future<void> deleteAgentMemory({
  required String agentAliasId,
  required String agentId,
  String? memoryId,
  String? sessionId,
}) async {
  final $query = <String, List<String>>{
    if (memoryId != null) 'memoryId': [memoryId],
    if (sessionId != null) 'sessionId': [sessionId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/agents/${Uri.encodeComponent(agentId)}/agentAliases/${Uri.encodeComponent(agentAliasId)}/memories',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}