@ai-sdk/amazon-bedrock 5.0.101 → 5.0.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/anthropic/index.d.ts +79 -76
- package/dist/anthropic/index.d.ts.map +1 -0
- package/dist/anthropic/index.js +429 -521
- package/dist/anthropic/index.js.map +1 -1
- package/dist/index.d.ts +218 -211
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2547 -3233
- package/dist/index.js.map +1 -1
- package/dist/mantle/index.cjs +181 -235
- package/dist/mantle/index.cjs.map +1 -1
- package/dist/mantle/index.d.cts +85 -82
- package/dist/mantle/index.d.cts.map +1 -0
- package/dist/mantle/index.d.ts +85 -82
- package/dist/mantle/index.d.ts.map +1 -0
- package/dist/mantle/index.js +178 -221
- package/dist/mantle/index.js.map +1 -1
- package/docs/08-amazon-bedrock.mdx +2 -2
- package/package.json +10 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,243 +1,250 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { anthropicTools } from "@ai-sdk/anthropic/internal";
|
|
2
|
+
import { FetchFunction, InferSchema } from "@ai-sdk/provider-utils";
|
|
3
|
+
import { z } from "zod/v4";
|
|
4
|
+
import { EmbeddingModelV4, ImageModelV4, LanguageModelV4, ProviderV4, RerankingModelV4 } from "@ai-sdk/provider";
|
|
5
|
+
import { AnthropicProviderOptions } from "@ai-sdk/anthropic";
|
|
6
|
+
//#region src/amazon-bedrock-embedding-model-options.d.ts
|
|
8
7
|
type AmazonBedrockEmbeddingModelId = 'amazon.titan-embed-text-v1' | 'amazon.titan-embed-text-v2:0' | 'cohere.embed-english-v3' | 'cohere.embed-multilingual-v3' | (string & {});
|
|
9
8
|
type AmazonBedrockEmbeddingModelSettings = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The embedding model family.
|
|
11
|
+
*
|
|
12
|
+
* Specify this when the model ID does not identify the underlying model,
|
|
13
|
+
* such as an application inference profile ARN.
|
|
14
|
+
*/
|
|
15
|
+
modelFamily?: 'titan' | 'cohere' | 'nova';
|
|
17
16
|
};
|
|
18
17
|
declare const amazonBedrockEmbeddingModelOptionsSchema: z.ZodObject<{
|
|
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
|
-
|
|
18
|
+
dimensions: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1024>, z.ZodLiteral<512>, z.ZodLiteral<256>]>>;
|
|
19
|
+
normalize: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
embeddingDimension: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<256>, z.ZodLiteral<384>, z.ZodLiteral<1024>, z.ZodLiteral<3072>]>>;
|
|
21
|
+
embeddingPurpose: z.ZodOptional<z.ZodEnum<{
|
|
22
|
+
GENERIC_INDEX: "GENERIC_INDEX";
|
|
23
|
+
TEXT_RETRIEVAL: "TEXT_RETRIEVAL";
|
|
24
|
+
IMAGE_RETRIEVAL: "IMAGE_RETRIEVAL";
|
|
25
|
+
VIDEO_RETRIEVAL: "VIDEO_RETRIEVAL";
|
|
26
|
+
DOCUMENT_RETRIEVAL: "DOCUMENT_RETRIEVAL";
|
|
27
|
+
AUDIO_RETRIEVAL: "AUDIO_RETRIEVAL";
|
|
28
|
+
GENERIC_RETRIEVAL: "GENERIC_RETRIEVAL";
|
|
29
|
+
CLASSIFICATION: "CLASSIFICATION";
|
|
30
|
+
CLUSTERING: "CLUSTERING";
|
|
31
|
+
}>>;
|
|
32
|
+
inputType: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
search_document: "search_document";
|
|
34
|
+
search_query: "search_query";
|
|
35
|
+
classification: "classification";
|
|
36
|
+
clustering: "clustering";
|
|
37
|
+
}>>;
|
|
38
|
+
truncate: z.ZodOptional<z.ZodEnum<{
|
|
39
|
+
NONE: "NONE";
|
|
40
|
+
START: "START";
|
|
41
|
+
END: "END";
|
|
42
|
+
}>>;
|
|
43
|
+
outputDimension: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<256>, z.ZodLiteral<512>, z.ZodLiteral<1024>, z.ZodLiteral<1536>]>>;
|
|
45
44
|
}, z.core.$strip>;
|
|
46
45
|
type AmazonBedrockEmbeddingModelOptions = z.infer<typeof amazonBedrockEmbeddingModelOptionsSchema>;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/amazon-bedrock-image-model-options.d.ts
|
|
48
|
+
declare const amazonBedrockImageModelOptionsSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
49
|
+
quality?: "standard" | "premium" | undefined;
|
|
50
|
+
negativeText?: string | undefined;
|
|
51
|
+
cfgScale?: number | undefined;
|
|
52
|
+
style?: "3D_ANIMATED_FAMILY_FILM" | "DESIGN_SKETCH" | "FLAT_VECTOR_ILLUSTRATION" | "GRAPHIC_NOVEL_ILLUSTRATION" | "MAXIMALISM" | "MIDCENTURY_RETRO" | "PHOTOREALISM" | "SOFT_DIGITAL_PAINTING" | undefined;
|
|
53
|
+
taskType?: "TEXT_IMAGE" | "IMAGE_VARIATION" | "INPAINTING" | "OUTPAINTING" | "BACKGROUND_REMOVAL" | undefined;
|
|
54
|
+
maskPrompt?: string | undefined;
|
|
55
|
+
outPaintingMode?: "DEFAULT" | "PRECISE" | undefined;
|
|
56
|
+
similarityStrength?: number | undefined;
|
|
57
57
|
}>;
|
|
58
58
|
type AmazonBedrockImageModelOptions = InferSchema<typeof amazonBedrockImageModelOptionsSchema>;
|
|
59
|
-
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/amazon-bedrock-chat-language-model-options.d.ts
|
|
60
61
|
type AmazonBedrockChatModelId = 'amazon.titan-tg1-large' | 'amazon.titan-text-express-v1' | 'anthropic.claude-v2' | 'anthropic.claude-v2:1' | 'anthropic.claude-instant-v1' | 'anthropic.claude-sonnet-5' | 'anthropic.claude-sonnet-5-5' | 'anthropic.claude-fable-5' | 'anthropic.claude-fable-5-1' | 'anthropic.claude-opus-5' | 'anthropic.claude-opus-5-5' | 'anthropic.claude-opus-4-8' | 'anthropic.claude-opus-4-7' | 'anthropic.claude-opus-4-6-v1' | 'anthropic.claude-sonnet-4-6-v1' | 'anthropic.claude-opus-4-5-20251101-v1:0' | 'anthropic.claude-haiku-4-5-20251001-v1:0' | 'anthropic.claude-sonnet-4-5-20250929-v1:0' | 'anthropic.claude-sonnet-4-20250514-v1:0' | 'anthropic.claude-opus-4-20250514-v1:0' | 'anthropic.claude-opus-4-1-20250805-v1:0' | 'anthropic.claude-3-7-sonnet-20250219-v1:0' | 'anthropic.claude-3-5-sonnet-20240620-v1:0' | 'anthropic.claude-3-5-sonnet-20241022-v2:0' | 'anthropic.claude-3-5-haiku-20241022-v1:0' | 'anthropic.claude-3-sonnet-20240229-v1:0' | 'anthropic.claude-3-haiku-20240307-v1:0' | 'anthropic.claude-3-opus-20240229-v1:0' | 'cohere.command-text-v14' | 'cohere.command-light-text-v14' | 'cohere.command-r-v1:0' | 'cohere.command-r-plus-v1:0' | 'meta.llama3-70b-instruct-v1:0' | 'meta.llama3-8b-instruct-v1:0' | 'meta.llama3-1-405b-instruct-v1:0' | 'meta.llama3-1-70b-instruct-v1:0' | 'meta.llama3-1-8b-instruct-v1:0' | 'meta.llama3-2-11b-instruct-v1:0' | 'meta.llama3-2-1b-instruct-v1:0' | 'meta.llama3-2-3b-instruct-v1:0' | 'meta.llama3-2-90b-instruct-v1:0' | 'mistral.mistral-7b-instruct-v0:2' | 'mistral.mixtral-8x7b-instruct-v0:1' | 'mistral.mistral-large-2402-v1:0' | 'mistral.mistral-small-2402-v1:0' | 'openai.gpt-oss-120b-1:0' | 'openai.gpt-oss-20b-1:0' | 'amazon.titan-text-express-v1' | 'amazon.titan-text-lite-v1' | 'us.amazon.nova-premier-v1:0' | 'us.amazon.nova-pro-v1:0' | 'us.amazon.nova-micro-v1:0' | 'us.amazon.nova-lite-v1:0' | 'us.anthropic.claude-3-sonnet-20240229-v1:0' | 'us.anthropic.claude-3-opus-20240229-v1:0' | 'us.anthropic.claude-3-haiku-20240307-v1:0' | 'us.anthropic.claude-3-5-sonnet-20240620-v1:0' | 'us.anthropic.claude-3-5-haiku-20241022-v1:0' | 'us.anthropic.claude-3-5-sonnet-20241022-v2:0' | 'us.anthropic.claude-3-7-sonnet-20250219-v1:0' | 'us.anthropic.claude-sonnet-5' | 'us.anthropic.claude-sonnet-5-5' | 'us.anthropic.claude-fable-5' | 'us.anthropic.claude-fable-5-1' | 'us.anthropic.claude-opus-5' | 'us.anthropic.claude-opus-5-5' | 'us.anthropic.claude-opus-4-8' | 'us.anthropic.claude-opus-4-7' | 'us.anthropic.claude-opus-4-6-v1' | 'us.anthropic.claude-sonnet-4-6-v1' | 'us.anthropic.claude-opus-4-5-20251101-v1:0' | 'us.anthropic.claude-sonnet-4-5-20250929-v1:0' | 'us.anthropic.claude-sonnet-4-20250514-v1:0' | 'us.anthropic.claude-opus-4-20250514-v1:0' | 'us.anthropic.claude-opus-4-1-20250805-v1:0' | 'us.anthropic.claude-haiku-4-5-20251001-v1:0' | 'global.anthropic.claude-fable-5-1' | 'us.meta.llama3-2-11b-instruct-v1:0' | 'us.meta.llama3-2-3b-instruct-v1:0' | 'us.meta.llama3-2-90b-instruct-v1:0' | 'us.meta.llama3-2-1b-instruct-v1:0' | 'us.meta.llama3-1-8b-instruct-v1:0' | 'us.meta.llama3-1-70b-instruct-v1:0' | 'us.meta.llama3-3-70b-instruct-v1:0' | 'us.deepseek.r1-v1:0' | 'us.mistral.pixtral-large-2502-v1:0' | 'us.meta.llama4-scout-17b-instruct-v1:0' | 'us.meta.llama4-maverick-17b-instruct-v1:0' | (string & {});
|
|
61
62
|
type AmazonBedrockChatModelSettings = {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
/**
|
|
64
|
+
* The chat model family.
|
|
65
|
+
*
|
|
66
|
+
* Specify this when the model ID does not identify the underlying model,
|
|
67
|
+
* such as an application inference profile ARN.
|
|
68
|
+
*/
|
|
69
|
+
modelFamily?: 'anthropic';
|
|
69
70
|
};
|
|
70
71
|
declare const amazonBedrockLanguageModelChatOptions: z.ZodObject<{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
structuredOutputMode: z.ZodOptional<z.ZodEnum<{
|
|
73
|
+
outputFormat: "outputFormat";
|
|
74
|
+
jsonTool: "jsonTool";
|
|
75
|
+
auto: "auto";
|
|
76
|
+
}>>;
|
|
77
|
+
additionalModelRequestFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
78
|
+
reasoningConfig: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">, z.ZodLiteral<"adaptive">]>>;
|
|
80
|
+
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
maxReasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
82
|
+
low: "low";
|
|
83
|
+
medium: "medium";
|
|
84
|
+
high: "high";
|
|
85
|
+
xhigh: "xhigh";
|
|
86
|
+
max: "max";
|
|
75
87
|
}>>;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
80
|
-
maxReasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
81
|
-
low: "low";
|
|
82
|
-
medium: "medium";
|
|
83
|
-
high: "high";
|
|
84
|
-
xhigh: "xhigh";
|
|
85
|
-
max: "max";
|
|
86
|
-
}>>;
|
|
87
|
-
display: z.ZodOptional<z.ZodEnum<{
|
|
88
|
-
omitted: "omitted";
|
|
89
|
-
summarized: "summarized";
|
|
90
|
-
}>>;
|
|
91
|
-
}, z.core.$strip>>;
|
|
92
|
-
anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
93
|
-
serviceTier: z.ZodOptional<z.ZodEnum<{
|
|
94
|
-
default: "default";
|
|
95
|
-
reserved: "reserved";
|
|
96
|
-
priority: "priority";
|
|
97
|
-
flex: "flex";
|
|
88
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
89
|
+
omitted: "omitted";
|
|
90
|
+
summarized: "summarized";
|
|
98
91
|
}>>;
|
|
92
|
+
}, z.core.$strip>>;
|
|
93
|
+
anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
94
|
+
serviceTier: z.ZodOptional<z.ZodEnum<{
|
|
95
|
+
default: "default";
|
|
96
|
+
reserved: "reserved";
|
|
97
|
+
priority: "priority";
|
|
98
|
+
flex: "flex";
|
|
99
|
+
}>>;
|
|
99
100
|
}, z.core.$strip>;
|
|
100
101
|
type AmazonBedrockLanguageModelChatOptions = z.infer<typeof amazonBedrockLanguageModelChatOptions>;
|
|
101
|
-
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/amazon-bedrock-image-settings.d.ts
|
|
102
104
|
type AmazonBedrockImageModelId = 'amazon.nova-canvas-v1:0' | (string & {});
|
|
103
|
-
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/amazon-bedrock-sigv4-fetch.d.ts
|
|
104
107
|
interface AmazonBedrockCredentials {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
region: string;
|
|
109
|
+
accessKeyId: string;
|
|
110
|
+
secretAccessKey: string;
|
|
111
|
+
sessionToken?: string;
|
|
109
112
|
}
|
|
110
|
-
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region src/reranking/amazon-bedrock-reranking-model-options.d.ts
|
|
111
115
|
type AmazonBedrockRerankingModelId = 'amazon.rerank-v1:0' | 'cohere.rerank-v3-5:0' | (string & {});
|
|
112
116
|
type AmazonBedrockRerankingModelOptions = {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
/**
|
|
118
|
+
* If the total number of results was greater than could fit in a response, a token is returned in the nextToken field. You can enter that token in this field to return the next batch of results.
|
|
119
|
+
*/
|
|
120
|
+
nextToken?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Additional model request fields to pass to the model.
|
|
123
|
+
*/
|
|
124
|
+
additionalModelRequestFields?: Record<string, unknown>;
|
|
121
125
|
};
|
|
122
|
-
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region src/amazon-bedrock-provider.d.ts
|
|
123
128
|
interface AmazonBedrockProviderSettings {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
129
|
+
/**
|
|
130
|
+
* The AWS region to use for the Bedrock provider. Defaults to the value of the
|
|
131
|
+
* `AWS_REGION` environment variable.
|
|
132
|
+
*/
|
|
133
|
+
region?: string;
|
|
134
|
+
/**
|
|
135
|
+
* API key for authenticating requests using Bearer token authentication.
|
|
136
|
+
* When provided, this will be used instead of AWS SigV4 authentication.
|
|
137
|
+
* Defaults to the value of the `AWS_BEARER_TOKEN_BEDROCK` environment variable.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```typescript
|
|
141
|
+
* // Using API key directly
|
|
142
|
+
* const bedrock = createAmazonBedrock({
|
|
143
|
+
* apiKey: 'your-api-key-here',
|
|
144
|
+
* region: 'us-east-1'
|
|
145
|
+
* });
|
|
146
|
+
*
|
|
147
|
+
* // Using environment variable AWS_BEARER_TOKEN_BEDROCK
|
|
148
|
+
* const bedrock = createAmazonBedrock({
|
|
149
|
+
* region: 'us-east-1'
|
|
150
|
+
* });
|
|
151
|
+
* ```
|
|
152
|
+
*
|
|
153
|
+
* Note: When `apiKey` is provided, it takes precedence over AWS SigV4 authentication.
|
|
154
|
+
* If neither `apiKey` nor `AWS_BEARER_TOKEN_BEDROCK` environment variable is set,
|
|
155
|
+
* the provider will fall back to AWS SigV4 authentication using AWS credentials.
|
|
156
|
+
*/
|
|
157
|
+
apiKey?: string;
|
|
158
|
+
/**
|
|
159
|
+
* The AWS access key ID to use for the Bedrock provider. Defaults to the value of the
|
|
160
|
+
* `AWS_ACCESS_KEY_ID` environment variable.
|
|
161
|
+
*/
|
|
162
|
+
accessKeyId?: string;
|
|
163
|
+
/**
|
|
164
|
+
* The AWS secret access key to use for the Bedrock provider. Defaults to the value of the
|
|
165
|
+
* `AWS_SECRET_ACCESS_KEY` environment variable.
|
|
166
|
+
*/
|
|
167
|
+
secretAccessKey?: string;
|
|
168
|
+
/**
|
|
169
|
+
* The AWS session token to use for the Bedrock provider. When `accessKeyId` and
|
|
170
|
+
* `secretAccessKey` are both passed explicitly as options, only this field is used
|
|
171
|
+
* If either access key field is omitted and resolved from the environment, the
|
|
172
|
+
* session token also falls back to `AWS_SESSION_TOKEN` when not set here.
|
|
173
|
+
*/
|
|
174
|
+
sessionToken?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Base URL for the Bedrock API calls.
|
|
177
|
+
*/
|
|
178
|
+
baseURL?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Custom headers to include in the requests.
|
|
181
|
+
*/
|
|
182
|
+
headers?: Record<string, string>;
|
|
183
|
+
/**
|
|
184
|
+
* Custom fetch implementation. You can use it as a middleware to intercept requests,
|
|
185
|
+
* or to provide a custom fetch implementation for e.g. testing.
|
|
186
|
+
*/
|
|
187
|
+
fetch?: FetchFunction;
|
|
188
|
+
/**
|
|
189
|
+
* The AWS credential provider to use for the Bedrock provider to get dynamic
|
|
190
|
+
* credentials similar to the AWS SDK. Setting a provider here will cause its
|
|
191
|
+
* credential values to be used instead of the `accessKeyId`, `secretAccessKey`,
|
|
192
|
+
* and `sessionToken` settings.
|
|
193
|
+
*/
|
|
194
|
+
credentialProvider?: () => PromiseLike<Omit<AmazonBedrockCredentials, 'region'>>;
|
|
195
|
+
generateId?: () => string;
|
|
191
196
|
}
|
|
192
197
|
interface AmazonBedrockProvider extends ProviderV4 {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
198
|
+
(modelId: AmazonBedrockChatModelId, settings?: AmazonBedrockChatModelSettings): LanguageModelV4;
|
|
199
|
+
languageModel(modelId: AmazonBedrockChatModelId, settings?: AmazonBedrockChatModelSettings): LanguageModelV4;
|
|
200
|
+
/**
|
|
201
|
+
* Creates a model for text embeddings.
|
|
202
|
+
*/
|
|
203
|
+
embedding(modelId: AmazonBedrockEmbeddingModelId, settings?: AmazonBedrockEmbeddingModelSettings): EmbeddingModelV4;
|
|
204
|
+
/**
|
|
205
|
+
* Creates a model for text embeddings.
|
|
206
|
+
*/
|
|
207
|
+
embeddingModel(modelId: AmazonBedrockEmbeddingModelId, settings?: AmazonBedrockEmbeddingModelSettings): EmbeddingModelV4;
|
|
208
|
+
/**
|
|
209
|
+
* @deprecated Use `embedding` instead.
|
|
210
|
+
*/
|
|
211
|
+
textEmbedding(modelId: AmazonBedrockEmbeddingModelId, settings?: AmazonBedrockEmbeddingModelSettings): EmbeddingModelV4;
|
|
212
|
+
/**
|
|
213
|
+
* @deprecated Use `embeddingModel` instead.
|
|
214
|
+
*/
|
|
215
|
+
textEmbeddingModel(modelId: AmazonBedrockEmbeddingModelId, settings?: AmazonBedrockEmbeddingModelSettings): EmbeddingModelV4;
|
|
216
|
+
/**
|
|
217
|
+
* Creates a model for image generation.
|
|
218
|
+
*/
|
|
219
|
+
image(modelId: AmazonBedrockImageModelId): ImageModelV4;
|
|
220
|
+
/**
|
|
221
|
+
* Creates a model for image generation.
|
|
222
|
+
*/
|
|
223
|
+
imageModel(modelId: AmazonBedrockImageModelId): ImageModelV4;
|
|
224
|
+
/**
|
|
225
|
+
* Creates a model for reranking documents.
|
|
226
|
+
*/
|
|
227
|
+
reranking(modelId: AmazonBedrockRerankingModelId): RerankingModelV4;
|
|
228
|
+
/**
|
|
229
|
+
* Creates a model for reranking documents.
|
|
230
|
+
*/
|
|
231
|
+
rerankingModel(modelId: AmazonBedrockRerankingModelId): RerankingModelV4;
|
|
232
|
+
/**
|
|
233
|
+
* Anthropic-specific tools that can be used with Anthropic models on Bedrock.
|
|
234
|
+
*/
|
|
235
|
+
tools: typeof anthropicTools;
|
|
231
236
|
}
|
|
232
237
|
/**
|
|
233
238
|
* Create an Amazon Bedrock provider instance.
|
|
234
239
|
*/
|
|
235
|
-
declare function createAmazonBedrock(options?: AmazonBedrockProviderSettings): AmazonBedrockProvider;
|
|
240
|
+
export declare function createAmazonBedrock(options?: AmazonBedrockProviderSettings): AmazonBedrockProvider;
|
|
236
241
|
/**
|
|
237
242
|
* Default Amazon Bedrock provider instance.
|
|
238
243
|
*/
|
|
239
|
-
declare const amazonBedrock: AmazonBedrockProvider;
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
+
export declare const amazonBedrock: AmazonBedrockProvider;
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region src/version.d.ts
|
|
247
|
+
export declare const VERSION: string;
|
|
248
|
+
//#endregion
|
|
249
|
+
export { type AmazonBedrockChatModelSettings, type AmazonBedrockEmbeddingModelOptions, type AmazonBedrockEmbeddingModelSettings, type AmazonBedrockImageModelOptions, type AmazonBedrockLanguageModelChatOptions, type AmazonBedrockLanguageModelChatOptions as AmazonBedrockLanguageModelOptions, type AmazonBedrockLanguageModelChatOptions as BedrockProviderOptions, type AmazonBedrockProvider, type AmazonBedrockProviderSettings, type AmazonBedrockRerankingModelOptions, type AmazonBedrockRerankingModelOptions as BedrockRerankingOptions, type AnthropicProviderOptions, amazonBedrock as bedrock };
|
|
250
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/amazon-bedrock-embedding-model-options.ts","../src/amazon-bedrock-image-model-options.ts","../src/amazon-bedrock-chat-language-model-options.ts","../src/amazon-bedrock-image-settings.ts","../src/amazon-bedrock-sigv4-fetch.ts","../src/reranking/amazon-bedrock-reranking-model-options.ts","../src/amazon-bedrock-provider.ts","../src/version.ts"],"mappings":";;;;;;KAEY;KAOA;;;;;;;EAOV;;cAGW,0CAAwC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEnD,EAAA,KAAA;KAEU,qCAAqC,EAAE,aAC1C;;;cC/EI,uEAAoC;;;;;;;;;;KAkCrC,iCAAiC,mBACpC;;;KCvCG;KA2FA;;;;;;;EAOV;;cAqDW,uCAAqC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6ChD,EAAA,KAAA;KAEU,wCAAwC,EAAE,aAC7C;;;KC1MG;;;UCUK;EACf;EACA;EACA;EACA;;;;KCVU;KAKA;;;;EAIV;;;;EAKA,+BAA+B;;;;UCmBhB;;;;;EAKf;;;;;;;;;;;;;;;;;;;;;;;;EAyBA;;;;;EAMA;;;;;EAMA;;;;;;;EAQA;;;;EAKA;;;;EAKA,UAAU;;;;;EAMV,QAAQ;;;;;;;EAQR,2BAA2B,YACzB,KAAK;EAIP;;UAGe,8BAA8B;GAE3C,SAAS,0BACT,WAAW,iCACV;EAEH,cACE,SAAS,0BACT,WAAW,iCACV;;;;EAKH,UACE,SAAS,+BACT,WAAW,sCACV;;;;EAKH,eACE,SAAS,+BACT,WAAW,sCACV;;;;EAKH,cACE,SAAS,+BACT,WAAW,sCACV;;;;EAKH,mBACE,SAAS,+BACT,WAAW,sCACV;;;;EAKH,MAAM,SAAS,4BAA4B;;;;EAK3C,WAAW,SAAS,4BAA4B;;;;EAKhD,UAAU,SAAS,gCAAgC;;;;EAKnD,eAAe,SAAS,gCAAgC;;;;EAKxD,cAAc;;;;;wBAMA,oBACd,UAAS,gCACR;;;;qBA+MU,eAAa;;;qBC9Yb"}
|