Skip to content

Commit

Permalink
feat(client-bedrock): Adding converse support to CMI API's
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Oct 18, 2024
1 parent a4c0494 commit 46406ae
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export interface GetImportedModelCommandOutput extends GetImportedModelResponse,
* // creationTime: new Date("TIMESTAMP"),
* // modelArchitecture: "STRING_VALUE",
* // modelKmsKeyArn: "STRING_VALUE",
* // instructSupported: true || false,
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export interface ListImportedModelsCommandOutput extends ListImportedModelsRespo
* // modelArn: "STRING_VALUE", // required
* // modelName: "STRING_VALUE", // required
* // creationTime: new Date("TIMESTAMP"), // required
* // instructSupported: true || false,
* // modelArchitecture: "STRING_VALUE",
* // },
* // ],
* // };
Expand Down
20 changes: 19 additions & 1 deletion clients/client-bedrock/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3322,6 +3322,12 @@ export interface GetImportedModelResponse {
* @public
*/
modelKmsKeyArn?: string;

/**
* <p>Specifies if the imported model supports fine tuning.</p>
* @public
*/
instructSupported?: boolean;
}

/**
Expand Down Expand Up @@ -3495,7 +3501,7 @@ export interface ListImportedModelsRequest {
}

/**
* <p>Information about tne imported model.</p>
* <p>Information about the imported model.</p>
* @public
*/
export interface ImportedModelSummary {
Expand All @@ -3516,6 +3522,18 @@ export interface ImportedModelSummary {
* @public
*/
creationTime: Date | undefined;

/**
* <p>Specifies if the imported model supports fine tuning.</p>
* @public
*/
instructSupported?: boolean;

/**
* <p>The architecture of the imported model.</p>
* @public
*/
modelArchitecture?: string;
}

/**
Expand Down
4 changes: 4 additions & 0 deletions clients/client-bedrock/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
_json,
collectBody,
decorateServiceException as __decorateServiceException,
expectBoolean as __expectBoolean,
expectInt32 as __expectInt32,
expectNonNull as __expectNonNull,
expectObject as __expectObject,
Expand Down Expand Up @@ -1634,6 +1635,7 @@ export const de_GetImportedModelCommand = async (
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const doc = take(data, {
creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
instructSupported: __expectBoolean,
jobArn: __expectString,
jobName: __expectString,
modelArchitecture: __expectString,
Expand Down Expand Up @@ -2842,6 +2844,8 @@ const de_GuardrailSummary = (output: any, context: __SerdeContext): GuardrailSum
const de_ImportedModelSummary = (output: any, context: __SerdeContext): ImportedModelSummary => {
return take(output, {
creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
instructSupported: __expectBoolean,
modelArchitecture: __expectString,
modelArn: __expectString,
modelName: __expectString,
}) as any;
Expand Down
28 changes: 26 additions & 2 deletions codegen/sdk-codegen/aws-models/bedrock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2720,7 +2720,7 @@
"min": 1,
"max": 2048
},
"smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:((:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:provisioned-model/[a-z0-9]{12})|([0-9]{12}:inference-profile/(([a-z]{2}.)[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63})))))|(([a-z]{2}[.]{1})([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))$"
"smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:((:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:provisioned-model/[a-z0-9]{12})|([0-9]{12}:imported-model/[a-z0-9]{12})|([0-9]{12}:inference-profile/(([a-z]{2}.)[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63})))))|(([a-z]{2}[.]{1})([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))$"
}
},
"com.amazonaws.bedrock#EvaluationModelIdentifiers": {
Expand Down Expand Up @@ -3757,6 +3757,12 @@
"traits": {
"smithy.api#documentation": "<p>The imported model is encrypted at rest using this key.</p>"
}
},
"instructSupported": {
"target": "com.amazonaws.bedrock#InstructSupported",
"traits": {
"smithy.api#documentation": "<p>Specifies if the imported model supports fine tuning.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -6189,10 +6195,22 @@
"smithy.api#documentation": "<p>Creation time of the imported model.</p>",
"smithy.api#required": {}
}
},
"instructSupported": {
"target": "com.amazonaws.bedrock#InstructSupported",
"traits": {
"smithy.api#documentation": "<p>Specifies if the imported model supports fine tuning.</p>"
}
},
"modelArchitecture": {
"target": "com.amazonaws.bedrock#ModelArchitecture",
"traits": {
"smithy.api#documentation": "<p>The architecture of the imported model.</p>"
}
}
},
"traits": {
"smithy.api#documentation": "<p>Information about tne imported model.</p>"
"smithy.api#documentation": "<p>Information about the imported model.</p>"
}
},
"com.amazonaws.bedrock#ImportedModelSummaryList": {
Expand Down Expand Up @@ -6410,6 +6428,9 @@
"target": "com.amazonaws.bedrock#InferenceType"
}
},
"com.amazonaws.bedrock#InstructSupported": {
"type": "boolean"
},
"com.amazonaws.bedrock#InternalServerException": {
"type": "structure",
"members": {
Expand Down Expand Up @@ -7866,6 +7887,9 @@
"com.amazonaws.bedrock#MetricFloat": {
"type": "float"
},
"com.amazonaws.bedrock#ModelArchitecture": {
"type": "string"
},
"com.amazonaws.bedrock#ModelArn": {
"type": "string",
"traits": {
Expand Down

0 comments on commit 46406ae

Please sign in to comment.