-
Notifications
You must be signed in to change notification settings - Fork 2.5k
/
Copy pathtypes.ts
44 lines (37 loc) · 1.26 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import type {
ToolChoice,
Tool as BedrockTool,
} from "@aws-sdk/client-bedrock-runtime";
import type { AwsCredentialIdentity, Provider } from "@aws-sdk/types";
import { ConverseCommand } from "@aws-sdk/client-bedrock-runtime";
import { BindToolsInput } from "@langchain/core/language_models/chat_models";
export type CredentialType =
| AwsCredentialIdentity
| Provider<AwsCredentialIdentity>;
export type ConverseCommandParams = ConstructorParameters<
typeof ConverseCommand
>[0];
export type BedrockToolChoice =
| ToolChoice.AnyMember
| ToolChoice.AutoMember
| ToolChoice.ToolMember;
export type ChatBedrockConverseToolType = BindToolsInput | BedrockTool;
export type MessageContentReasoningBlockReasoningText = {
type: "reasoning_content";
reasoningText: {
text: string;
signature: string;
};
};
export type MessageContentReasoningBlockRedacted = {
type: "reasoning_content";
redactedContent: string;
};
export type MessageContentReasoningBlockReasoningTextPartial = {
type: "reasoning_content";
reasoningText: { text: string } | { signature: string };
};
export type MessageContentReasoningBlock =
| MessageContentReasoningBlockReasoningText
| MessageContentReasoningBlockRedacted
| MessageContentReasoningBlockReasoningTextPartial;