@adaline/bedrock 0.20.0 → 0.22.0
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/dist/index.d.mts +92 -1
- package/dist/index.d.ts +92 -1
- package/dist/index.js +43 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import * as zod from 'zod';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { BaseChatModel } from '@adaline/anthropic';
|
|
4
4
|
import { ChatModelSchemaType, UrlType, HeadersType, ParamsType, ProviderV1, ChatModelV1, EmbeddingModelSchemaType, EmbeddingModelV1 } from '@adaline/provider';
|
|
5
|
-
import { ConfigType, MessageType, ToolType, PartialChatResponseType } from '@adaline/types';
|
|
5
|
+
import { ConfigType, MessageType, ToolType, PartialChatResponseType, ChatModelPriceType } from '@adaline/types';
|
|
6
6
|
|
|
7
7
|
declare const BedrockAnthropicChatModelBaseConfigSchema: (maxOutputTokens: number, maxSequences: number) => zod.ZodObject<zod.objectUtil.extendShape<{
|
|
8
8
|
temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
|
|
@@ -251,6 +251,7 @@ declare class BaseChatModelAnthropic extends BaseChatModel {
|
|
|
251
251
|
getProxyCompleteChatUrl(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<UrlType>;
|
|
252
252
|
getProxyCompleteChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType>;
|
|
253
253
|
getProxyStreamChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType>;
|
|
254
|
+
getModelPricing(): ChatModelPriceType;
|
|
254
255
|
}
|
|
255
256
|
|
|
256
257
|
declare const BedrockClaude3_5Haiku20241022Literal = "anthropic.claude-3-5-haiku-20241022-v1:0";
|
|
@@ -299,6 +300,21 @@ declare const BedrockClaude3_5Haiku20241022Schema: {
|
|
|
299
300
|
}>;
|
|
300
301
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
301
302
|
};
|
|
303
|
+
price: {
|
|
304
|
+
modelName: string;
|
|
305
|
+
currency: string;
|
|
306
|
+
tokenRanges: {
|
|
307
|
+
minTokens: number;
|
|
308
|
+
prices: {
|
|
309
|
+
base: {
|
|
310
|
+
inputPricePerMillion: number;
|
|
311
|
+
outputPricePerMillion: number;
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
maxTokens?: number | null | undefined;
|
|
315
|
+
}[];
|
|
316
|
+
};
|
|
317
|
+
maxReasoningTokens?: number | undefined;
|
|
302
318
|
};
|
|
303
319
|
declare const BedrockClaude3_5Haiku20241022Options: z.ZodObject<{
|
|
304
320
|
modelName: z.ZodString;
|
|
@@ -364,6 +380,21 @@ declare const BedrockClaude3_5Sonnet20240620Schema: {
|
|
|
364
380
|
}>;
|
|
365
381
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
366
382
|
};
|
|
383
|
+
price: {
|
|
384
|
+
modelName: string;
|
|
385
|
+
currency: string;
|
|
386
|
+
tokenRanges: {
|
|
387
|
+
minTokens: number;
|
|
388
|
+
prices: {
|
|
389
|
+
base: {
|
|
390
|
+
inputPricePerMillion: number;
|
|
391
|
+
outputPricePerMillion: number;
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
maxTokens?: number | null | undefined;
|
|
395
|
+
}[];
|
|
396
|
+
};
|
|
397
|
+
maxReasoningTokens?: number | undefined;
|
|
367
398
|
};
|
|
368
399
|
declare const BedrockClaude3_5Sonnet20240620Options: z.ZodObject<{
|
|
369
400
|
modelName: z.ZodString;
|
|
@@ -429,6 +460,21 @@ declare const BedrockClaude3_5Sonnet20241022Schema: {
|
|
|
429
460
|
}>;
|
|
430
461
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
431
462
|
};
|
|
463
|
+
price: {
|
|
464
|
+
modelName: string;
|
|
465
|
+
currency: string;
|
|
466
|
+
tokenRanges: {
|
|
467
|
+
minTokens: number;
|
|
468
|
+
prices: {
|
|
469
|
+
base: {
|
|
470
|
+
inputPricePerMillion: number;
|
|
471
|
+
outputPricePerMillion: number;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
maxTokens?: number | null | undefined;
|
|
475
|
+
}[];
|
|
476
|
+
};
|
|
477
|
+
maxReasoningTokens?: number | undefined;
|
|
432
478
|
};
|
|
433
479
|
declare const BedrockClaude3_5Sonnet20241022Options: z.ZodObject<{
|
|
434
480
|
modelName: z.ZodString;
|
|
@@ -494,6 +540,21 @@ declare const BedrockClaude3Haiku20240307Schema: {
|
|
|
494
540
|
}>;
|
|
495
541
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
496
542
|
};
|
|
543
|
+
price: {
|
|
544
|
+
modelName: string;
|
|
545
|
+
currency: string;
|
|
546
|
+
tokenRanges: {
|
|
547
|
+
minTokens: number;
|
|
548
|
+
prices: {
|
|
549
|
+
base: {
|
|
550
|
+
inputPricePerMillion: number;
|
|
551
|
+
outputPricePerMillion: number;
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
maxTokens?: number | null | undefined;
|
|
555
|
+
}[];
|
|
556
|
+
};
|
|
557
|
+
maxReasoningTokens?: number | undefined;
|
|
497
558
|
};
|
|
498
559
|
declare const BedrockClaude3Haiku20240307Options: z.ZodObject<{
|
|
499
560
|
modelName: z.ZodString;
|
|
@@ -559,6 +620,21 @@ declare const BedrockClaude3Opus20240229Schema: {
|
|
|
559
620
|
}>;
|
|
560
621
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
561
622
|
};
|
|
623
|
+
price: {
|
|
624
|
+
modelName: string;
|
|
625
|
+
currency: string;
|
|
626
|
+
tokenRanges: {
|
|
627
|
+
minTokens: number;
|
|
628
|
+
prices: {
|
|
629
|
+
base: {
|
|
630
|
+
inputPricePerMillion: number;
|
|
631
|
+
outputPricePerMillion: number;
|
|
632
|
+
};
|
|
633
|
+
};
|
|
634
|
+
maxTokens?: number | null | undefined;
|
|
635
|
+
}[];
|
|
636
|
+
};
|
|
637
|
+
maxReasoningTokens?: number | undefined;
|
|
562
638
|
};
|
|
563
639
|
declare const BedrockClaude3Opus20240229Options: z.ZodObject<{
|
|
564
640
|
modelName: z.ZodString;
|
|
@@ -624,6 +700,21 @@ declare const BedrockClaude3Sonnet20240229Schema: {
|
|
|
624
700
|
}>;
|
|
625
701
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
626
702
|
};
|
|
703
|
+
price: {
|
|
704
|
+
modelName: string;
|
|
705
|
+
currency: string;
|
|
706
|
+
tokenRanges: {
|
|
707
|
+
minTokens: number;
|
|
708
|
+
prices: {
|
|
709
|
+
base: {
|
|
710
|
+
inputPricePerMillion: number;
|
|
711
|
+
outputPricePerMillion: number;
|
|
712
|
+
};
|
|
713
|
+
};
|
|
714
|
+
maxTokens?: number | null | undefined;
|
|
715
|
+
}[];
|
|
716
|
+
};
|
|
717
|
+
maxReasoningTokens?: number | undefined;
|
|
627
718
|
};
|
|
628
719
|
declare const BedrockClaude3Sonnet20240229Options: z.ZodObject<{
|
|
629
720
|
modelName: z.ZodString;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as zod from 'zod';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { BaseChatModel } from '@adaline/anthropic';
|
|
4
4
|
import { ChatModelSchemaType, UrlType, HeadersType, ParamsType, ProviderV1, ChatModelV1, EmbeddingModelSchemaType, EmbeddingModelV1 } from '@adaline/provider';
|
|
5
|
-
import { ConfigType, MessageType, ToolType, PartialChatResponseType } from '@adaline/types';
|
|
5
|
+
import { ConfigType, MessageType, ToolType, PartialChatResponseType, ChatModelPriceType } from '@adaline/types';
|
|
6
6
|
|
|
7
7
|
declare const BedrockAnthropicChatModelBaseConfigSchema: (maxOutputTokens: number, maxSequences: number) => zod.ZodObject<zod.objectUtil.extendShape<{
|
|
8
8
|
temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
|
|
@@ -251,6 +251,7 @@ declare class BaseChatModelAnthropic extends BaseChatModel {
|
|
|
251
251
|
getProxyCompleteChatUrl(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<UrlType>;
|
|
252
252
|
getProxyCompleteChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType>;
|
|
253
253
|
getProxyStreamChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType>;
|
|
254
|
+
getModelPricing(): ChatModelPriceType;
|
|
254
255
|
}
|
|
255
256
|
|
|
256
257
|
declare const BedrockClaude3_5Haiku20241022Literal = "anthropic.claude-3-5-haiku-20241022-v1:0";
|
|
@@ -299,6 +300,21 @@ declare const BedrockClaude3_5Haiku20241022Schema: {
|
|
|
299
300
|
}>;
|
|
300
301
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
301
302
|
};
|
|
303
|
+
price: {
|
|
304
|
+
modelName: string;
|
|
305
|
+
currency: string;
|
|
306
|
+
tokenRanges: {
|
|
307
|
+
minTokens: number;
|
|
308
|
+
prices: {
|
|
309
|
+
base: {
|
|
310
|
+
inputPricePerMillion: number;
|
|
311
|
+
outputPricePerMillion: number;
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
maxTokens?: number | null | undefined;
|
|
315
|
+
}[];
|
|
316
|
+
};
|
|
317
|
+
maxReasoningTokens?: number | undefined;
|
|
302
318
|
};
|
|
303
319
|
declare const BedrockClaude3_5Haiku20241022Options: z.ZodObject<{
|
|
304
320
|
modelName: z.ZodString;
|
|
@@ -364,6 +380,21 @@ declare const BedrockClaude3_5Sonnet20240620Schema: {
|
|
|
364
380
|
}>;
|
|
365
381
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
366
382
|
};
|
|
383
|
+
price: {
|
|
384
|
+
modelName: string;
|
|
385
|
+
currency: string;
|
|
386
|
+
tokenRanges: {
|
|
387
|
+
minTokens: number;
|
|
388
|
+
prices: {
|
|
389
|
+
base: {
|
|
390
|
+
inputPricePerMillion: number;
|
|
391
|
+
outputPricePerMillion: number;
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
maxTokens?: number | null | undefined;
|
|
395
|
+
}[];
|
|
396
|
+
};
|
|
397
|
+
maxReasoningTokens?: number | undefined;
|
|
367
398
|
};
|
|
368
399
|
declare const BedrockClaude3_5Sonnet20240620Options: z.ZodObject<{
|
|
369
400
|
modelName: z.ZodString;
|
|
@@ -429,6 +460,21 @@ declare const BedrockClaude3_5Sonnet20241022Schema: {
|
|
|
429
460
|
}>;
|
|
430
461
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
431
462
|
};
|
|
463
|
+
price: {
|
|
464
|
+
modelName: string;
|
|
465
|
+
currency: string;
|
|
466
|
+
tokenRanges: {
|
|
467
|
+
minTokens: number;
|
|
468
|
+
prices: {
|
|
469
|
+
base: {
|
|
470
|
+
inputPricePerMillion: number;
|
|
471
|
+
outputPricePerMillion: number;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
maxTokens?: number | null | undefined;
|
|
475
|
+
}[];
|
|
476
|
+
};
|
|
477
|
+
maxReasoningTokens?: number | undefined;
|
|
432
478
|
};
|
|
433
479
|
declare const BedrockClaude3_5Sonnet20241022Options: z.ZodObject<{
|
|
434
480
|
modelName: z.ZodString;
|
|
@@ -494,6 +540,21 @@ declare const BedrockClaude3Haiku20240307Schema: {
|
|
|
494
540
|
}>;
|
|
495
541
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
496
542
|
};
|
|
543
|
+
price: {
|
|
544
|
+
modelName: string;
|
|
545
|
+
currency: string;
|
|
546
|
+
tokenRanges: {
|
|
547
|
+
minTokens: number;
|
|
548
|
+
prices: {
|
|
549
|
+
base: {
|
|
550
|
+
inputPricePerMillion: number;
|
|
551
|
+
outputPricePerMillion: number;
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
maxTokens?: number | null | undefined;
|
|
555
|
+
}[];
|
|
556
|
+
};
|
|
557
|
+
maxReasoningTokens?: number | undefined;
|
|
497
558
|
};
|
|
498
559
|
declare const BedrockClaude3Haiku20240307Options: z.ZodObject<{
|
|
499
560
|
modelName: z.ZodString;
|
|
@@ -559,6 +620,21 @@ declare const BedrockClaude3Opus20240229Schema: {
|
|
|
559
620
|
}>;
|
|
560
621
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
561
622
|
};
|
|
623
|
+
price: {
|
|
624
|
+
modelName: string;
|
|
625
|
+
currency: string;
|
|
626
|
+
tokenRanges: {
|
|
627
|
+
minTokens: number;
|
|
628
|
+
prices: {
|
|
629
|
+
base: {
|
|
630
|
+
inputPricePerMillion: number;
|
|
631
|
+
outputPricePerMillion: number;
|
|
632
|
+
};
|
|
633
|
+
};
|
|
634
|
+
maxTokens?: number | null | undefined;
|
|
635
|
+
}[];
|
|
636
|
+
};
|
|
637
|
+
maxReasoningTokens?: number | undefined;
|
|
562
638
|
};
|
|
563
639
|
declare const BedrockClaude3Opus20240229Options: z.ZodObject<{
|
|
564
640
|
modelName: z.ZodString;
|
|
@@ -624,6 +700,21 @@ declare const BedrockClaude3Sonnet20240229Schema: {
|
|
|
624
700
|
}>;
|
|
625
701
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
626
702
|
};
|
|
703
|
+
price: {
|
|
704
|
+
modelName: string;
|
|
705
|
+
currency: string;
|
|
706
|
+
tokenRanges: {
|
|
707
|
+
minTokens: number;
|
|
708
|
+
prices: {
|
|
709
|
+
base: {
|
|
710
|
+
inputPricePerMillion: number;
|
|
711
|
+
outputPricePerMillion: number;
|
|
712
|
+
};
|
|
713
|
+
};
|
|
714
|
+
maxTokens?: number | null | undefined;
|
|
715
|
+
}[];
|
|
716
|
+
};
|
|
717
|
+
maxReasoningTokens?: number | undefined;
|
|
627
718
|
};
|
|
628
719
|
declare const BedrockClaude3Sonnet20240229Options: z.ZodObject<{
|
|
629
720
|
modelName: z.ZodString;
|