Amazon Bedrock

2024/10/18 - Amazon Bedrock - 2 updated api methods

Changes  Adding converse support to CMI API's

GetImportedModel (updated) Link ¶
Changes (response)
{'instructSupported': 'boolean'}

Gets properties associated with a customized model you imported.

See also: AWS API Documentation

Request Syntax

client.get_imported_model(
    modelIdentifier='string'
)
type modelIdentifier

string

param modelIdentifier

[REQUIRED]

Name or Amazon Resource Name (ARN) of the imported model.

rtype

dict

returns

Response Syntax

{
    'modelArn': 'string',
    'modelName': 'string',
    'jobName': 'string',
    'jobArn': 'string',
    'modelDataSource': {
        's3DataSource': {
            's3Uri': 'string'
        }
    },
    'creationTime': datetime(2015, 1, 1),
    'modelArchitecture': 'string',
    'modelKmsKeyArn': 'string',
    'instructSupported': True|False
}

Response Structure

  • (dict) --

    • modelArn (string) --

      The Amazon Resource Name (ARN) associated with this imported model.

    • modelName (string) --

      The name of the imported model.

    • jobName (string) --

      Job name associated with the imported model.

    • jobArn (string) --

      Job Amazon Resource Name (ARN) associated with the imported model.

    • modelDataSource (dict) --

      The data source for this imported model.

      Note

      This is a Tagged Union structure. Only one of the following top level keys will be set: s3DataSource. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

      'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
      • s3DataSource (dict) --

        The Amazon S3 data source of the imported model.

        • s3Uri (string) --

          The URI of the Amazon S3 data source.

    • creationTime (datetime) --

      Creation time of the imported model.

    • modelArchitecture (string) --

      The architecture of the imported model.

    • modelKmsKeyArn (string) --

      The imported model is encrypted at rest using this key.

    • instructSupported (boolean) --

      Specifies if the imported model supports fine tuning.

ListImportedModels (updated) Link ¶
Changes (response)
{'modelSummaries': {'instructSupported': 'boolean',
                    'modelArchitecture': 'string'}}

Returns a list of models you've imported. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide.

See also: AWS API Documentation

Request Syntax

client.list_imported_models(
    creationTimeBefore=datetime(2015, 1, 1),
    creationTimeAfter=datetime(2015, 1, 1),
    nameContains='string',
    maxResults=123,
    nextToken='string',
    sortBy='CreationTime',
    sortOrder='Ascending'|'Descending'
)
type creationTimeBefore

datetime

param creationTimeBefore

Return imported models that created before the specified time.

type creationTimeAfter

datetime

param creationTimeAfter

Return imported models that were created after the specified time.

type nameContains

string

param nameContains

Return imported models only if the model name contains these characters.

type maxResults

integer

param maxResults

The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

type nextToken

string

param nextToken

If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

type sortBy

string

param sortBy

The field to sort by in the returned list of imported models.

type sortOrder

string

param sortOrder

Specifies whetehr to sort the results in ascending or descending order.

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'modelSummaries': [
        {
            'modelArn': 'string',
            'modelName': 'string',
            'creationTime': datetime(2015, 1, 1),
            'instructSupported': True|False,
            'modelArchitecture': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      If the total number of results is greater than the maxResults value provided in the request, use this token when making another request in the nextToken field to return the next batch of results.

    • modelSummaries (list) --

      Model summaries.

      • (dict) --

        Information about the imported model.

        • modelArn (string) --

          The Amazon Resource Name (ARN) of the imported model.

        • modelName (string) --

          Name of the imported model.

        • creationTime (datetime) --

          Creation time of the imported model.

        • instructSupported (boolean) --

          Specifies if the imported model supports fine tuning.

        • modelArchitecture (string) --

          The architecture of the imported model.