generative-ai-cdk-constructs

@cdklabs/generative-ai-cdk-constructs


@cdklabs/generative-ai-cdk-constructs / bedrock / PromptRouter

Class: PromptRouter

Represents an Amazon Bedrock abstraction on which you can run the Invoke API. This can be a Foundational Model, a Custom Model, or an Inference Profile.

Implements

Constructors

new PromptRouter()

new PromptRouter(props, region): PromptRouter

Parameters

props

PromptRouterProps

region

string

Returns

PromptRouter

Properties

invokableArn

readonly invokableArn: string

The ARN of the Bedrock invokable abstraction.

Implementation of

IInvokable.invokableArn


promptRouterArn

readonly promptRouterArn: string

The ARN of the prompt router.

Implementation of

IPromptRouter.promptRouterArn


promptRouterId

readonly promptRouterId: string

The Id of the prompt router.

Implementation of

IPromptRouter.promptRouterId


routingEndpoints

readonly routingEndpoints: IInvokable[]

The foundation models / profiles this router will route to.

Implementation of

IPromptRouter.routingEndpoints

Methods

grantInvoke()

grantInvoke(grantee): Grant

Gives the appropriate policies to invoke and use the invokable abstraction.

Parameters

grantee

IGrantable

Returns

Grant

Implementation of

IInvokable.grantInvoke


fromDefaultId()

static fromDefaultId(defaultRouter, region): PromptRouter

Parameters

defaultRouter

DefaultPromptRouterIdentifier

region

string

Returns

PromptRouter