-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
791 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md) | ||
|
||
*** | ||
|
||
[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / ChatMessage | ||
|
||
# Class: ChatMessage | ||
|
||
## Constructors | ||
|
||
### new ChatMessage() | ||
|
||
> **new ChatMessage**(`role`, `text`): [`ChatMessage`](ChatMessage.md) | ||
#### Parameters | ||
|
||
##### role | ||
|
||
[`ChatMessageRole`](../enumerations/ChatMessageRole.md) | ||
|
||
##### text | ||
|
||
`string` | ||
|
||
#### Returns | ||
|
||
[`ChatMessage`](ChatMessage.md) | ||
|
||
## Properties | ||
|
||
### role | ||
|
||
> `readonly` **role**: [`ChatMessageRole`](../enumerations/ChatMessageRole.md) | ||
*** | ||
|
||
### text | ||
|
||
> `readonly` **text**: `string` | ||
## Methods | ||
|
||
### \_\_render() | ||
|
||
> **\_\_render**(): `MessageProperty` | ||
**`Internal`** | ||
|
||
Renders as Cfn Property | ||
This is an internal core function and should not be called directly. | ||
|
||
#### Returns | ||
|
||
`MessageProperty` | ||
|
||
*** | ||
|
||
### assistantMessage() | ||
|
||
> `static` **assistantMessage**(`text`): [`ChatMessage`](ChatMessage.md) | ||
#### Parameters | ||
|
||
##### text | ||
|
||
`string` | ||
|
||
#### Returns | ||
|
||
[`ChatMessage`](ChatMessage.md) | ||
|
||
*** | ||
|
||
### userMessage() | ||
|
||
> `static` **userMessage**(`text`): [`ChatMessage`](ChatMessage.md) | ||
#### Parameters | ||
|
||
##### text | ||
|
||
`string` | ||
|
||
#### Returns | ||
|
||
[`ChatMessage`](ChatMessage.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md) | ||
|
||
*** | ||
|
||
[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / ToolChoice | ||
|
||
# Class: ToolChoice | ||
|
||
## Constructors | ||
|
||
### new ToolChoice() | ||
|
||
> **new ToolChoice**(`any`, `auto`, `tool`?): [`ToolChoice`](ToolChoice.md) | ||
#### Parameters | ||
|
||
##### any | ||
|
||
`any` | ||
|
||
##### auto | ||
|
||
`any` | ||
|
||
##### tool? | ||
|
||
`string` | ||
|
||
#### Returns | ||
|
||
[`ToolChoice`](ToolChoice.md) | ||
|
||
## Properties | ||
|
||
### any? | ||
|
||
> `readonly` `optional` **any**: `any` | ||
*** | ||
|
||
### auto? | ||
|
||
> `readonly` `optional` **auto**: `any` | ||
*** | ||
|
||
### tool? | ||
|
||
> `readonly` `optional` **tool**: `string` | ||
*** | ||
|
||
### ANY | ||
|
||
> `readonly` `static` **ANY**: [`ToolChoice`](ToolChoice.md) | ||
The model must request at least one tool (no text is generated) | ||
|
||
*** | ||
|
||
### AUTO | ||
|
||
> `readonly` `static` **AUTO**: [`ToolChoice`](ToolChoice.md) | ||
(Default). The Model automatically decides if a tool should be called or whether to generate text instead. | ||
|
||
## Methods | ||
|
||
### \_\_render() | ||
|
||
> **\_\_render**(): `ToolChoiceProperty` | ||
**`Internal`** | ||
|
||
#### Returns | ||
|
||
`ToolChoiceProperty` | ||
|
||
*** | ||
|
||
### specificTool() | ||
|
||
> `static` **specificTool**(`toolName`): [`ToolChoice`](ToolChoice.md) | ||
The Model must request the specified tool. Only supported by some models like Anthropic Claude 3 models. | ||
|
||
#### Parameters | ||
|
||
##### toolName | ||
|
||
`string` | ||
|
||
#### Returns | ||
|
||
[`ToolChoice`](ToolChoice.md) |
25 changes: 25 additions & 0 deletions
25
apidocs/namespaces/bedrock/enumerations/ChatMessageRole.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md) | ||
|
||
*** | ||
|
||
[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / ChatMessageRole | ||
|
||
# Enumeration: ChatMessageRole | ||
|
||
## Enumeration Members | ||
|
||
### ASSISTANT | ||
|
||
> **ASSISTANT**: `"assistant"` | ||
This is the role of the model itself, responding to user inputs based on | ||
the context set by the system. | ||
|
||
*** | ||
|
||
### USER | ||
|
||
> **USER**: `"user"` | ||
This role represents the human user in the conversation. Inputs from the | ||
user guide the conversation and prompt responses from the assistant. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,12 @@ | |
|
||
## Enumeration Members | ||
|
||
### CHAT | ||
|
||
> **CHAT**: `"CHAT"` | ||
*** | ||
|
||
### TEXT | ||
|
||
> **TEXT**: `"TEXT"` |
Oops, something went wrong.