get method
Gets a Model Garden publisher model.
Request parameters:
name
- Required. The name of the PublisherModel resource. Format:
publishers/{publisher}/models/{publisher_model}
Value must have pattern ^publishers/\[^/\]+/models/\[^/\]+$
.
huggingFaceToken
- Optional. Token used to access Hugging Face gated
models.
isHuggingFaceModel
- Optional. Boolean indicates whether the requested
model is a Hugging Face model.
languageCode
- Optional. The IETF BCP-47 language code representing the
language in which the publisher model's text information should be written
in.
view
- Optional. PublisherModel view specifying which fields to read.
Possible string values are:
- "PUBLISHER_MODEL_VIEW_UNSPECIFIED" : The default / unset value. The API will default to the BASIC view.
- "PUBLISHER_MODEL_VIEW_BASIC" : Include basic metadata about the publisher model, but not the full contents.
- "PUBLISHER_MODEL_VIEW_FULL" : Include everything.
- "PUBLISHER_MODEL_VERSION_VIEW_BASIC" : Include: VersionId, ModelVersionExternalName, and SupportedActions.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudAiplatformV1PublisherModel.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<GoogleCloudAiplatformV1PublisherModel> get(
core.String name, {
core.String? huggingFaceToken,
core.bool? isHuggingFaceModel,
core.String? languageCode,
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (huggingFaceToken != null) 'huggingFaceToken': [huggingFaceToken],
if (isHuggingFaceModel != null)
'isHuggingFaceModel': ['${isHuggingFaceModel}'],
if (languageCode != null) 'languageCode': [languageCode],
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleCloudAiplatformV1PublisherModel.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}