listFoundationModels method
- ModelCustomization? byCustomizationType,
- InferenceType? byInferenceType,
- ModelModality? byOutputModality,
- String? byProvider,
Lists Amazon Bedrock foundation models that you can use. You can filter the results with the request parameters. For more information, see Foundation models in the Amazon Bedrock User Guide.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter byCustomizationType :
Return models that support the customization type that you specify. For
more information, see Custom
models in the Amazon
Bedrock User Guide.
Parameter byInferenceType :
Return models that support the inference type that you specify. For more
information, see Provisioned
Throughput in the Amazon
Bedrock User Guide.
Parameter byOutputModality :
Return models that support the output modality that you specify.
Parameter byProvider :
Return models belonging to the model provider that you specify.
Implementation
Future<ListFoundationModelsResponse> listFoundationModels({
ModelCustomization? byCustomizationType,
InferenceType? byInferenceType,
ModelModality? byOutputModality,
String? byProvider,
}) async {
final $query = <String, List<String>>{
if (byCustomizationType != null)
'byCustomizationType': [byCustomizationType.value],
if (byInferenceType != null) 'byInferenceType': [byInferenceType.value],
if (byOutputModality != null)
'byOutputModality': [byOutputModality.value],
if (byProvider != null) 'byProvider': [byProvider],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/foundation-models',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListFoundationModelsResponse.fromJson(response);
}