agent-claw: automated task changes
This commit is contained in:
238
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/create-model-customization-job.d.ts
generated
vendored
Normal file
238
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/create-model-customization-job.d.ts
generated
vendored
Normal file
@@ -0,0 +1,238 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type * as bedrock from '../../../aws-bedrock';
|
||||
import type * as ec2 from '../../../aws-ec2';
|
||||
import * as iam from '../../../aws-iam';
|
||||
import type * as kms from '../../../aws-kms';
|
||||
import type * as s3 from '../../../aws-s3';
|
||||
import * as sfn from '../../../aws-stepfunctions';
|
||||
/**
|
||||
* The customization type.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html
|
||||
*/
|
||||
export declare enum CustomizationType {
|
||||
/**
|
||||
* Fine-tuning
|
||||
*
|
||||
* Provide labeled data in order to train a model to improve performance on specific tasks.
|
||||
*/
|
||||
FINE_TUNING = "FINE_TUNING",
|
||||
/**
|
||||
* Continued pre-training
|
||||
*
|
||||
* Provide unlabeled data to pre-train a foundation model by familiarizing it with certain types of inputs.
|
||||
*/
|
||||
CONTINUED_PRE_TRAINING = "CONTINUED_PRE_TRAINING",
|
||||
/**
|
||||
* Distillation
|
||||
*
|
||||
* With Model Distillation, you can generate synthetic responses from a large foundation model (teacher)
|
||||
* and use that data to train a smaller model (student) for your specific use-case.
|
||||
*/
|
||||
DISTILLATION = "DISTILLATION"
|
||||
}
|
||||
/**
|
||||
* The key/value pair for a tag.
|
||||
*/
|
||||
export interface CustomModelTag {
|
||||
/**
|
||||
* Key for the tag.
|
||||
*/
|
||||
readonly key: string;
|
||||
/**
|
||||
* Value for the tag.
|
||||
*/
|
||||
readonly value: string;
|
||||
}
|
||||
/**
|
||||
* S3 bucket configuration for data storage destination.
|
||||
*/
|
||||
export interface DataBucketConfiguration {
|
||||
/**
|
||||
* The S3 bucket.
|
||||
*/
|
||||
readonly bucket: s3.IBucket;
|
||||
/**
|
||||
* Path to file or directory within the bucket.
|
||||
*
|
||||
* @default - root of the bucket
|
||||
*/
|
||||
readonly path?: string;
|
||||
}
|
||||
/**
|
||||
* S3 bucket configuration for the output data.
|
||||
*/
|
||||
export interface OutputBucketConfiguration extends DataBucketConfiguration {
|
||||
}
|
||||
/**
|
||||
* S3 bucket configuration for the training data.
|
||||
*/
|
||||
export interface TrainingBucketConfiguration extends DataBucketConfiguration {
|
||||
}
|
||||
/**
|
||||
* S3 bucket configuration for the validation data.
|
||||
*/
|
||||
export interface ValidationBucketConfiguration extends DataBucketConfiguration {
|
||||
}
|
||||
/**
|
||||
* VPC configuration
|
||||
*/
|
||||
export interface IBedrockCreateModelCustomizationJobVpcConfig {
|
||||
/**
|
||||
* VPC configuration security groups
|
||||
*
|
||||
* The minimum number of security groups is 1.
|
||||
* The maximum number of security groups is 5.
|
||||
*/
|
||||
readonly securityGroups: ec2.ISecurityGroup[];
|
||||
/**
|
||||
* VPC configuration subnets
|
||||
*
|
||||
* The minimum number of subnets is 1.
|
||||
* The maximum number of subnets is 16.
|
||||
*/
|
||||
readonly subnets: ec2.ISubnet[];
|
||||
}
|
||||
/**
|
||||
* Properties for invoking a Bedrock Model
|
||||
*/
|
||||
export interface BedrockCreateModelCustomizationJobProps extends sfn.TaskStateBaseProps {
|
||||
/**
|
||||
* The base model.
|
||||
*/
|
||||
readonly baseModel: bedrock.IModel;
|
||||
/**
|
||||
* A unique, case-sensitive identifier to ensure that the API request completes no more than one time.
|
||||
* If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error.
|
||||
*
|
||||
* The maximum length is 256 characters.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html
|
||||
*
|
||||
* @default - no client request token
|
||||
*/
|
||||
readonly clientRequestToken?: string;
|
||||
/**
|
||||
* The customization type.
|
||||
*
|
||||
* @default FINE_TUNING
|
||||
*/
|
||||
readonly customizationType?: CustomizationType;
|
||||
/**
|
||||
* The custom model is encrypted at rest using this key.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/bedrock/latest/userguide/encryption-custom-job.html
|
||||
*
|
||||
* @default - encrypted with the AWS owned key
|
||||
*/
|
||||
readonly customModelKmsKey?: kms.IKey;
|
||||
/**
|
||||
* A name for the resulting custom model.
|
||||
*
|
||||
* The maximum length is 63 characters.
|
||||
*/
|
||||
readonly customModelName: string;
|
||||
/**
|
||||
* Tags to attach to the resulting custom model.
|
||||
*
|
||||
* The maximum number of tags is 200.
|
||||
*
|
||||
* @default - no tags
|
||||
*/
|
||||
readonly customModelTags?: CustomModelTag[];
|
||||
/**
|
||||
* Parameters related to tuning the model.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models-hp.html
|
||||
*
|
||||
* @default - use default hyperparameters
|
||||
*/
|
||||
readonly hyperParameters?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* A name for the fine-tuning job.
|
||||
*
|
||||
* The maximum length is 63 characters.
|
||||
*/
|
||||
readonly jobName: string;
|
||||
/**
|
||||
* Tags to attach to the job.
|
||||
* The maximum number of tags is 200.
|
||||
*
|
||||
* @default - no tags
|
||||
*/
|
||||
readonly jobTags?: CustomModelTag[];
|
||||
/**
|
||||
* The S3 bucket configuration where the output data is stored.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_OutputDataConfig.html
|
||||
*/
|
||||
readonly outputData: OutputBucketConfiguration;
|
||||
/**
|
||||
* The IAM role that Amazon Bedrock can assume to perform tasks on your behalf.
|
||||
*
|
||||
* For example, during model training, Amazon Bedrock needs your permission to read input data from an S3 bucket,
|
||||
* write model artifacts to an S3 bucket.
|
||||
* To pass this role to Amazon Bedrock, the caller of this API must have the iam:PassRole permission.
|
||||
*
|
||||
* @default - use auto generated role
|
||||
*/
|
||||
readonly role?: iam.IRoleRef;
|
||||
/**
|
||||
* The S3 bucket configuration where the training data is stored.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_TrainingDataConfig.html
|
||||
*/
|
||||
readonly trainingData: TrainingBucketConfiguration;
|
||||
/**
|
||||
* The S3 bucket configuration where the validation data is stored.
|
||||
* If you don't provide a validation dataset, specify the evaluation percentage by the `Evaluation percentage` hyperparameter.
|
||||
*
|
||||
* The maximum number is 10.
|
||||
*
|
||||
* @default undefined - validate using a subset of the training data
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_Validator.html
|
||||
*/
|
||||
readonly validationData?: ValidationBucketConfiguration[];
|
||||
/**
|
||||
* The VPC configuration.
|
||||
*
|
||||
* @default - no VPC configuration
|
||||
*/
|
||||
readonly vpcConfig?: IBedrockCreateModelCustomizationJobVpcConfig;
|
||||
}
|
||||
/**
|
||||
* A Step Functions Task to create model customization in Bedrock.
|
||||
*/
|
||||
export declare class BedrockCreateModelCustomizationJob extends sfn.TaskStateBase {
|
||||
private readonly props;
|
||||
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
|
||||
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
|
||||
protected readonly taskPolicies?: iam.PolicyStatement[];
|
||||
private readonly integrationPattern;
|
||||
private _role;
|
||||
constructor(scope: Construct, id: string, props: BedrockCreateModelCustomizationJobProps);
|
||||
/**
|
||||
* The IAM role for the bedrock create model customization job
|
||||
*/
|
||||
get role(): iam.IRole;
|
||||
/**
|
||||
* Configure the IAM role for the bedrock create model customization job
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-iam-role.html
|
||||
*/
|
||||
private renderBedrockCreateModelCustomizationJobRole;
|
||||
private createVpcConfigPolicyStatement;
|
||||
private renderPolicyStatements;
|
||||
private validateStringLength;
|
||||
private validatePattern;
|
||||
private validateArrayLength;
|
||||
/**
|
||||
* Provides the Bedrock CreateModelCustomizationJob service integration task configuration
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
protected _renderTask(): any;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/create-model-customization-job.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/create-model-customization-job.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
25
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/guardrail.d.ts
generated
vendored
Normal file
25
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/guardrail.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Guradrail settings for BedrockInvokeModel
|
||||
*/
|
||||
export declare class Guardrail {
|
||||
readonly guardrailIdentifier: string;
|
||||
readonly guardrailVersion: string;
|
||||
/**
|
||||
* Enable guardrail
|
||||
*
|
||||
* @param identifier The id or arn of the guardrail.
|
||||
* @param version The version of the guardrail.
|
||||
*/
|
||||
static enable(identifier: string, version: number): Guardrail;
|
||||
/**
|
||||
* Enable guardrail with DRAFT version
|
||||
*
|
||||
* @param identifier The identifier of the guardrail. Must be between 1 and 2048 characters in length.
|
||||
*/
|
||||
static enableDraft(identifier: string): Guardrail;
|
||||
/**
|
||||
* @param guardrailIdentifier The identitifier of guardrail.
|
||||
* @param guardrailVersion The version of guardrail.
|
||||
*/
|
||||
private constructor();
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/guardrail.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/guardrail.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Guardrail=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class Guardrail{guardrailIdentifier;guardrailVersion;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.Guardrail",version:"2.252.0"};static enable(identifier,version){if(!core_1().Token.isUnresolved(version)&&(version<1||version>99999999))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`GuardrailVersionOutOfRange`,`\`version\` must be between 1 and 99999999, got ${version}.`);return new Guardrail(identifier,version.toString())}static enableDraft(identifier){return new Guardrail(identifier,"DRAFT")}constructor(guardrailIdentifier,guardrailVersion){if(this.guardrailIdentifier=guardrailIdentifier,this.guardrailVersion=guardrailVersion,!core_1().Token.isUnresolved(guardrailIdentifier)){let gurdrailId;if(guardrailIdentifier.startsWith("arn:")){const arn=core_1().Arn.split(guardrailIdentifier,core_1().ArnFormat.SLASH_RESOURCE_NAME);if(!arn.resourceName)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`InvalidGuardrailArnFormat`,`Invalid ARN format. The ARN of Guradrail should have the format: \`arn:<partition>:bedrock:<region>:<account-id>:guardrail/<guardrail-name>\`, got ${guardrailIdentifier}.`);gurdrailId=arn.resourceName}else gurdrailId=guardrailIdentifier;if(!/^[a-z0-9]+$/.test(gurdrailId))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`GuardrailContainOnlyLowercase`,`The id of Guardrail must contain only lowercase letters and numbers, got ${gurdrailId}.`);if(guardrailIdentifier.length>2048)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`GuardrailIdentifierTooLong`,`\`guardrailIdentifier\` length must be between 0 and 2048, got ${guardrailIdentifier.length}.`)}}}exports.Guardrail=Guardrail;
|
||||
167
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/invoke-model.d.ts
generated
vendored
Normal file
167
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/invoke-model.d.ts
generated
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { Guardrail } from './guardrail';
|
||||
import type * as bedrock from '../../../aws-bedrock';
|
||||
import * as iam from '../../../aws-iam';
|
||||
import type * as s3 from '../../../aws-s3';
|
||||
import * as sfn from '../../../aws-stepfunctions';
|
||||
/**
|
||||
* Location to retrieve the input data, prior to calling Bedrock InvokeModel.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-bedrock.html
|
||||
*/
|
||||
export interface BedrockInvokeModelInputProps {
|
||||
/**
|
||||
* S3 object to retrieve the input data from.
|
||||
*
|
||||
* If the S3 location is not set, then the Body must be set.
|
||||
*
|
||||
* @default - Input data is retrieved from the `body` field
|
||||
*/
|
||||
readonly s3Location?: s3.Location;
|
||||
/**
|
||||
* The source location where the API response is written.
|
||||
*
|
||||
* This field can be used to specify s3 URI in the form of token
|
||||
*
|
||||
* @default - The API response body is returned in the result.
|
||||
*/
|
||||
readonly s3InputUri?: string;
|
||||
}
|
||||
/**
|
||||
* Location where the Bedrock InvokeModel API response is written.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-bedrock.html
|
||||
*/
|
||||
export interface BedrockInvokeModelOutputProps {
|
||||
/**
|
||||
* S3 object where the Bedrock InvokeModel API response is written.
|
||||
*
|
||||
* If you specify this field, the API response body is replaced with
|
||||
* a reference to the Amazon S3 location of the original output.
|
||||
*
|
||||
* @default - Response body is returned in the task result
|
||||
*/
|
||||
readonly s3Location?: s3.Location;
|
||||
/**
|
||||
* The destination location where the API response is written.
|
||||
*
|
||||
* This field can be used to specify s3 URI in the form of token
|
||||
*
|
||||
* @default - The API response body is returned in the result.
|
||||
*/
|
||||
readonly s3OutputUri?: string;
|
||||
}
|
||||
interface BedrockInvokeModelOptions {
|
||||
/**
|
||||
* The Bedrock model that the task will invoke.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
|
||||
*/
|
||||
readonly model: bedrock.IModel;
|
||||
/**
|
||||
* The input data for the Bedrock model invocation.
|
||||
*
|
||||
* The inference parameters contained in the body depend on the Bedrock model being used.
|
||||
*
|
||||
* The body must be in the format specified in the `contentType` field.
|
||||
* For example, if the content type is `application/json`, the body must be
|
||||
* JSON formatted.
|
||||
*
|
||||
* The body must be up to 256 KB in size. For input data that exceeds 256 KB,
|
||||
* use `input` instead to retrieve the input data from S3.
|
||||
*
|
||||
* You must specify either the `body` or the `input` field, but not both.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html
|
||||
*
|
||||
* @default - Input data is retrieved from the location specified in the `input` field
|
||||
*/
|
||||
readonly body?: sfn.TaskInput;
|
||||
/**
|
||||
* The desired MIME type of the inference body in the response.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html
|
||||
* @default 'application/json'
|
||||
*/
|
||||
readonly accept?: string;
|
||||
/**
|
||||
* The MIME type of the input data in the request.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html
|
||||
* @default 'application/json'
|
||||
* @deprecated This property does not require configuration because the only acceptable value is 'application/json'.
|
||||
*/
|
||||
readonly contentType?: string;
|
||||
/**
|
||||
* The source location to retrieve the input data from.
|
||||
*
|
||||
* @default - Input data is retrieved from the `body` field
|
||||
*/
|
||||
readonly input?: BedrockInvokeModelInputProps;
|
||||
/**
|
||||
* The destination location where the API response is written.
|
||||
*
|
||||
* If you specify this field, the API response body is replaced with a reference to the
|
||||
* output location.
|
||||
*
|
||||
* @default - The API response body is returned in the result.
|
||||
*/
|
||||
readonly output?: BedrockInvokeModelOutputProps;
|
||||
/**
|
||||
* The guardrail is applied to the invocation
|
||||
*
|
||||
* @default - No guardrail is applied to the invocation.
|
||||
*/
|
||||
readonly guardrail?: Guardrail;
|
||||
/**
|
||||
* Specifies whether to enable or disable the Bedrock trace.
|
||||
*
|
||||
* @default - Trace is not enabled for the invocation.
|
||||
*/
|
||||
readonly traceEnabled?: boolean;
|
||||
}
|
||||
/**
|
||||
* Properties for invoking a Bedrock Model
|
||||
*/
|
||||
export interface BedrockInvokeModelJsonPathProps extends sfn.TaskStateJsonPathBaseProps, BedrockInvokeModelOptions {
|
||||
}
|
||||
/**
|
||||
* Properties for invoking a Bedrock Model
|
||||
*/
|
||||
export interface BedrockInvokeModelJsonataProps extends sfn.TaskStateJsonataBaseProps, BedrockInvokeModelOptions {
|
||||
}
|
||||
/**
|
||||
* Properties for invoking a Bedrock Model
|
||||
*/
|
||||
export interface BedrockInvokeModelProps extends sfn.TaskStateBaseProps, BedrockInvokeModelOptions {
|
||||
}
|
||||
/**
|
||||
* A Step Functions Task to invoke a model in Bedrock.
|
||||
*/
|
||||
export declare class BedrockInvokeModel extends sfn.TaskStateBase {
|
||||
private readonly props;
|
||||
/**
|
||||
* A Step Functions Task using JSONPath to invoke a model in Bedrock.
|
||||
*/
|
||||
static jsonPath(scope: Construct, id: string, props: BedrockInvokeModelJsonPathProps): BedrockInvokeModel;
|
||||
/**
|
||||
* A Step Functions Task using JSONata to invoke a model in Bedrock.
|
||||
*/
|
||||
static jsonata(scope: Construct, id: string, props: BedrockInvokeModelJsonataProps): BedrockInvokeModel;
|
||||
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
|
||||
protected readonly taskMetrics: sfn.TaskMetricsConfig | undefined;
|
||||
protected readonly taskPolicies: iam.PolicyStatement[] | undefined;
|
||||
private readonly integrationPattern;
|
||||
private readonly modelOutput?;
|
||||
constructor(scope: Construct, id: string, props: BedrockInvokeModelProps);
|
||||
private renderPolicyStatements;
|
||||
/**
|
||||
* Provides the Bedrock InvokeModel service integration task configuration
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
|
||||
private getInputSource;
|
||||
private getOutputSource;
|
||||
}
|
||||
export {};
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/invoke-model.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/invoke-model.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user