Class S3ApiSchema
(experimental) Class to define an API Schema from an S3 object.
Inherited Members
Namespace: Amazon.CDK.AWS.Bedrock.Alpha
Assembly: Amazon.CDK.AWS.Bedrock.Alpha.dll
Syntax (csharp)
public class S3ApiSchema : ApiSchema
Syntax (vb)
Public Class S3ApiSchema Inherits ApiSchema
Remarks
Stability: Experimental
ExampleMetadata: fixture=default infused
Examples
var bucket = Bucket.FromBucketName(this, "ExistingBucket", "my-schema-bucket");
var s3Schema = ApiSchema.FromS3File(bucket, "schemas/action-group.yaml");
var actionGroupFunction = new Function(this, "ActionGroupFunction", new FunctionProps {
Runtime = Runtime.PYTHON_3_12,
Handler = "index.handler",
Code = Code.FromAsset(Join(__dirname, "../lambda/action-group"))
});
var actionGroup = new AgentActionGroup(new AgentActionGroupProps {
Name = "query-library",
Description = "Use these functions to get information about the books in the library.",
Executor = ActionGroupExecutor.FromLambda(actionGroupFunction),
Enabled = true,
ApiSchema = s3Schema
});
var agent = new Agent(this, "Agent", new AgentProps {
FoundationModel = BedrockFoundationModel.ANTHROPIC_CLAUDE_HAIKU_V1_0,
Instruction = "You are a helpful and friendly agent that answers questions about literature."
});
agent.AddActionGroup(actionGroup);
Synopsis
Constructors
| S3ApiSchema(ILocation) | (experimental) Class to define an API Schema from an S3 object. |
Constructors
S3ApiSchema(ILocation)
(experimental) Class to define an API Schema from an S3 object.
public S3ApiSchema(ILocation location)
Parameters
- location ILocation
Remarks
Stability: Experimental