@effect-aws/client-bedrock-runtime 1.9.5 → 1.10.2
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/cjs/BedrockRuntimeService.d.ts +17 -12
- package/dist/cjs/BedrockRuntimeService.d.ts.map +1 -1
- package/dist/cjs/BedrockRuntimeService.js +2 -1
- package/dist/cjs/BedrockRuntimeService.js.map +1 -1
- package/dist/cjs/Errors.d.ts +3 -3
- package/dist/cjs/Errors.d.ts.map +1 -1
- package/dist/cjs/Errors.js +1 -3
- package/dist/cjs/Errors.js.map +1 -1
- package/dist/dts/BedrockRuntimeService.d.ts +17 -12
- package/dist/dts/BedrockRuntimeService.d.ts.map +1 -1
- package/dist/dts/Errors.d.ts +3 -3
- package/dist/dts/Errors.d.ts.map +1 -1
- package/dist/esm/BedrockRuntimeService.js +3 -2
- package/dist/esm/BedrockRuntimeService.js.map +1 -1
- package/dist/esm/Errors.js +0 -2
- package/dist/esm/Errors.js.map +1 -1
- package/package.json +2 -2
- package/src/BedrockRuntimeService.ts +39 -4
- package/src/Errors.ts +1 -4
|
@@ -1,45 +1,50 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @since 1.0.0
|
|
3
3
|
*/
|
|
4
|
-
import { type ApplyGuardrailCommandInput, type ApplyGuardrailCommandOutput, type BedrockRuntimeClient, type BedrockRuntimeClientConfig, type ConverseCommandInput, type ConverseCommandOutput, type ConverseStreamCommandInput, type ConverseStreamCommandOutput, type GetAsyncInvokeCommandInput, type GetAsyncInvokeCommandOutput, type InvokeModelCommandInput, type InvokeModelCommandOutput, type InvokeModelWithResponseStreamCommandInput, type InvokeModelWithResponseStreamCommandOutput, type ListAsyncInvokesCommandInput, type ListAsyncInvokesCommandOutput, type StartAsyncInvokeCommandInput, type StartAsyncInvokeCommandOutput } from "@aws-sdk/client-bedrock-runtime";
|
|
5
|
-
import type { HttpHandlerOptions,
|
|
4
|
+
import { type ApplyGuardrailCommandInput, type ApplyGuardrailCommandOutput, type BedrockRuntimeClient, type BedrockRuntimeClientConfig, type ConverseCommandInput, type ConverseCommandOutput, type ConverseStreamCommandInput, type ConverseStreamCommandOutput, type GetAsyncInvokeCommandInput, type GetAsyncInvokeCommandOutput, type InvokeModelCommandInput, type InvokeModelCommandOutput, type InvokeModelWithBidirectionalStreamCommandInput, type InvokeModelWithBidirectionalStreamCommandOutput, type InvokeModelWithResponseStreamCommandInput, type InvokeModelWithResponseStreamCommandOutput, type ListAsyncInvokesCommandInput, type ListAsyncInvokesCommandOutput, type StartAsyncInvokeCommandInput, type StartAsyncInvokeCommandOutput } from "@aws-sdk/client-bedrock-runtime";
|
|
5
|
+
import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons";
|
|
6
|
+
import type { Cause } from "effect";
|
|
6
7
|
import { Effect, Layer } from "effect";
|
|
7
8
|
import * as Instance from "./BedrockRuntimeClientInstance.js";
|
|
8
|
-
import type { AccessDeniedError, ConflictError, InternalServerError, ModelError, ModelNotReadyError, ModelStreamError, ModelTimeoutError, ResourceNotFoundError, ServiceQuotaExceededError, ServiceUnavailableError, ThrottlingError, ValidationError } from "./Errors.js";
|
|
9
|
+
import type { AccessDeniedError, ConflictError, InternalServerError, ModelError, ModelNotReadyError, ModelStreamError, ModelTimeoutError, ResourceNotFoundError, SdkError, ServiceQuotaExceededError, ServiceUnavailableError, ThrottlingError, ValidationError } from "./Errors.js";
|
|
9
10
|
interface BedrockRuntimeService$ {
|
|
10
11
|
readonly _: unique symbol;
|
|
11
12
|
/**
|
|
12
13
|
* @see {@link ApplyGuardrailCommand}
|
|
13
14
|
*/
|
|
14
|
-
applyGuardrail(args: ApplyGuardrailCommandInput, options?: HttpHandlerOptions): Effect.Effect<ApplyGuardrailCommandOutput, SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | ServiceQuotaExceededError | ThrottlingError | ValidationError>;
|
|
15
|
+
applyGuardrail(args: ApplyGuardrailCommandInput, options?: HttpHandlerOptions): Effect.Effect<ApplyGuardrailCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | ServiceQuotaExceededError | ThrottlingError | ValidationError>;
|
|
15
16
|
/**
|
|
16
17
|
* @see {@link ConverseCommand}
|
|
17
18
|
*/
|
|
18
|
-
converse(args: ConverseCommandInput, options?: HttpHandlerOptions): Effect.Effect<ConverseCommandOutput, SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelTimeoutError | ResourceNotFoundError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
19
|
+
converse(args: ConverseCommandInput, options?: HttpHandlerOptions): Effect.Effect<ConverseCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelTimeoutError | ResourceNotFoundError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
19
20
|
/**
|
|
20
21
|
* @see {@link ConverseStreamCommand}
|
|
21
22
|
*/
|
|
22
|
-
converseStream(args: ConverseStreamCommandInput, options?: HttpHandlerOptions): Effect.Effect<ConverseStreamCommandOutput, SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelTimeoutError | ResourceNotFoundError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
23
|
+
converseStream(args: ConverseStreamCommandInput, options?: HttpHandlerOptions): Effect.Effect<ConverseStreamCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelTimeoutError | ResourceNotFoundError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
23
24
|
/**
|
|
24
25
|
* @see {@link GetAsyncInvokeCommand}
|
|
25
26
|
*/
|
|
26
|
-
getAsyncInvoke(args: GetAsyncInvokeCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetAsyncInvokeCommandOutput, SdkError | AccessDeniedError | InternalServerError | ThrottlingError | ValidationError>;
|
|
27
|
+
getAsyncInvoke(args: GetAsyncInvokeCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetAsyncInvokeCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ThrottlingError | ValidationError>;
|
|
27
28
|
/**
|
|
28
29
|
* @see {@link InvokeModelCommand}
|
|
29
30
|
*/
|
|
30
|
-
invokeModel(args: InvokeModelCommandInput, options?: HttpHandlerOptions): Effect.Effect<InvokeModelCommandOutput, SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelTimeoutError | ResourceNotFoundError | ServiceQuotaExceededError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
31
|
+
invokeModel(args: InvokeModelCommandInput, options?: HttpHandlerOptions): Effect.Effect<InvokeModelCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelTimeoutError | ResourceNotFoundError | ServiceQuotaExceededError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
32
|
+
/**
|
|
33
|
+
* @see {@link InvokeModelWithBidirectionalStreamCommand}
|
|
34
|
+
*/
|
|
35
|
+
invokeModelWithBidirectionalStream(args: InvokeModelWithBidirectionalStreamCommandInput, options?: HttpHandlerOptions): Effect.Effect<InvokeModelWithBidirectionalStreamCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelStreamError | ModelTimeoutError | ResourceNotFoundError | ServiceQuotaExceededError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
31
36
|
/**
|
|
32
37
|
* @see {@link InvokeModelWithResponseStreamCommand}
|
|
33
38
|
*/
|
|
34
|
-
invokeModelWithResponseStream(args: InvokeModelWithResponseStreamCommandInput, options?: HttpHandlerOptions): Effect.Effect<InvokeModelWithResponseStreamCommandOutput, SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelStreamError | ModelTimeoutError | ResourceNotFoundError | ServiceQuotaExceededError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
39
|
+
invokeModelWithResponseStream(args: InvokeModelWithResponseStreamCommandInput, options?: HttpHandlerOptions): Effect.Effect<InvokeModelWithResponseStreamCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelStreamError | ModelTimeoutError | ResourceNotFoundError | ServiceQuotaExceededError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
35
40
|
/**
|
|
36
41
|
* @see {@link ListAsyncInvokesCommand}
|
|
37
42
|
*/
|
|
38
|
-
listAsyncInvokes(args: ListAsyncInvokesCommandInput, options?: HttpHandlerOptions): Effect.Effect<ListAsyncInvokesCommandOutput, SdkError | AccessDeniedError | InternalServerError | ThrottlingError | ValidationError>;
|
|
43
|
+
listAsyncInvokes(args: ListAsyncInvokesCommandInput, options?: HttpHandlerOptions): Effect.Effect<ListAsyncInvokesCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ThrottlingError | ValidationError>;
|
|
39
44
|
/**
|
|
40
45
|
* @see {@link StartAsyncInvokeCommand}
|
|
41
46
|
*/
|
|
42
|
-
startAsyncInvoke(args: StartAsyncInvokeCommandInput, options?: HttpHandlerOptions): Effect.Effect<StartAsyncInvokeCommandOutput, SdkError | AccessDeniedError | ConflictError | InternalServerError | ResourceNotFoundError | ServiceQuotaExceededError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
47
|
+
startAsyncInvoke(args: StartAsyncInvokeCommandInput, options?: HttpHandlerOptions): Effect.Effect<StartAsyncInvokeCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | ConflictError | InternalServerError | ResourceNotFoundError | ServiceQuotaExceededError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
43
48
|
}
|
|
44
49
|
/**
|
|
45
50
|
* @since 1.0.0
|
|
@@ -47,7 +52,7 @@ interface BedrockRuntimeService$ {
|
|
|
47
52
|
*/
|
|
48
53
|
export declare const makeBedrockRuntimeService: Effect.Effect<BedrockRuntimeService$, never, Instance.BedrockRuntimeClientInstance>;
|
|
49
54
|
declare const BedrockRuntimeService_base: import("effect/Context").TagClass<BedrockRuntimeService, "@effect-aws/client-bedrock-runtime/BedrockRuntimeService", BedrockRuntimeService$> & Effect.Tag.Proxy<BedrockRuntimeService, BedrockRuntimeService$> & {
|
|
50
|
-
use: <X>(body: (_: BedrockRuntimeService$) => X) => [X] extends [Effect.Effect<infer A, infer E, infer R>] ? Effect.Effect<A, E, BedrockRuntimeService | R> : [X] extends [PromiseLike<infer A_1>] ? Effect.Effect<A_1,
|
|
55
|
+
use: <X>(body: (_: BedrockRuntimeService$) => X) => [X] extends [Effect.Effect<infer A, infer E, infer R>] ? Effect.Effect<A, E, BedrockRuntimeService | R> : [X] extends [PromiseLike<infer A_1>] ? Effect.Effect<A_1, Cause.UnknownException, BedrockRuntimeService> : Effect.Effect<X, never, BedrockRuntimeService>;
|
|
51
56
|
};
|
|
52
57
|
/**
|
|
53
58
|
* @since 1.0.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BedrockRuntimeService.d.ts","sourceRoot":"","sources":["../../src/BedrockRuntimeService.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAE/B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAE1B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAEhC,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAEhC,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAE7B,KAAK,yCAAyC,EAC9C,KAAK,0CAA0C,EAE/C,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAElC,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EACnC,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"BedrockRuntimeService.d.ts","sourceRoot":"","sources":["../../src/BedrockRuntimeService.ts"],"names":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jH,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAY,sBAAsB,MAAM,sDAIzD;IACJ,MAAM,CAAC,QAAQ,CAAC,SAAS,aACb,CAAC,aAAa,EAAE,0BAA0B,KAAK,oBAAoB,sDAS3E;CACL;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,qBAAqB,CAAC;IAC7C;;OAEG;IACH,UAAiB,MAAO,SAAQ,IAAI,CAAC,0BAA0B,EAAE,QAAQ,CAAC;QACxE,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,6BAA6B,GAAG,IAAI,CAAC;KACtE;CACF"}
|
|
@@ -39,6 +39,7 @@ const commands = {
|
|
|
39
39
|
ConverseStreamCommand: client_bedrock_runtime_1.ConverseStreamCommand,
|
|
40
40
|
GetAsyncInvokeCommand: client_bedrock_runtime_1.GetAsyncInvokeCommand,
|
|
41
41
|
InvokeModelCommand: client_bedrock_runtime_1.InvokeModelCommand,
|
|
42
|
+
InvokeModelWithBidirectionalStreamCommand: client_bedrock_runtime_1.InvokeModelWithBidirectionalStreamCommand,
|
|
42
43
|
InvokeModelWithResponseStreamCommand: client_bedrock_runtime_1.InvokeModelWithResponseStreamCommand,
|
|
43
44
|
ListAsyncInvokesCommand: client_bedrock_runtime_1.ListAsyncInvokesCommand,
|
|
44
45
|
StartAsyncInvokeCommand: client_bedrock_runtime_1.StartAsyncInvokeCommand,
|
|
@@ -49,7 +50,7 @@ const commands = {
|
|
|
49
50
|
*/
|
|
50
51
|
exports.makeBedrockRuntimeService = effect_1.Effect.gen(function* () {
|
|
51
52
|
const client = yield* Instance.BedrockRuntimeClientInstance;
|
|
52
|
-
return commons_1.Service.fromClientAndCommands(client, commands, {
|
|
53
|
+
return yield* commons_1.Service.fromClientAndCommands(client, commands, {
|
|
53
54
|
errorTags: Errors_js_1.AllServiceErrors,
|
|
54
55
|
resolveClientConfig: BedrockRuntimeServiceConfig.toBedrockRuntimeClientConfig,
|
|
55
56
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BedrockRuntimeService.js","sourceRoot":"","sources":["../../src/BedrockRuntimeService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"BedrockRuntimeService.js","sourceRoot":"","sources":["../../src/BedrockRuntimeService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,4EA8ByC;AAEzC,iDAA8C;AAE9C,mCAAuC;AACvC,4EAA8D;AAC9D,8FAAgF;AAgBhF,2CAA+C;AAE/C,MAAM,QAAQ,GAAG;IACf,qBAAqB,EAArB,8CAAqB;IACrB,eAAe,EAAf,wCAAe;IACf,qBAAqB,EAArB,8CAAqB;IACrB,qBAAqB,EAArB,8CAAqB;IACrB,kBAAkB,EAAlB,2CAAkB;IAClB,yCAAyC,EAAzC,kEAAyC;IACzC,oCAAoC,EAApC,6DAAoC;IACpC,uBAAuB,EAAvB,gDAAuB;IACvB,uBAAuB,EAAvB,gDAAuB;CACxB,CAAC;AAgLF;;;GAGG;AACU,QAAA,yBAAyB,GAAG,eAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAC3D,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IAE5D,OAAO,KAAK,CAAC,CAAC,iBAAO,CAAC,qBAAqB,CACzC,MAAM,EACN,QAAQ,EACR;QACE,SAAS,EAAE,4BAAgB;QAC3B,mBAAmB,EAAE,2BAA2B,CAAC,4BAA4B;KAC9E,CACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAa,qBAAsB,SAAQ,eAAM,CAAC,GAAG,CAAC,0DAA0D,CAAC,EAG9G;IACD,MAAM,CAAU,YAAY,GAAG,cAAK,CAAC,MAAM,CAAC,IAAI,EAAE,iCAAyB,CAAC,CAAC,IAAI,CAAC,cAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACjH,MAAM,CAAU,KAAK,GAAG,CAAC,MAAoC,EAAE,EAAE,CAC/D,cAAK,CAAC,MAAM,CAAC,IAAI,EAAE,iCAAyB,CAAC,CAAC,IAAI,CAChD,cAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC7B,cAAK,CAAC,OAAO,CAAC,2BAA2B,CAAC,8BAA8B,CAAC,MAAM,CAAC,CAAC,CAClF,CAAC;IACJ,MAAM,CAAU,SAAS,GAAG,CAC1B,QAA6E,EAC7E,EAAE,CACF,cAAK,CAAC,MAAM,CAAC,IAAI,EAAE,iCAAyB,CAAC,CAAC,IAAI,CAChD,cAAK,CAAC,OAAO,CACX,cAAK,CAAC,MAAM,CACV,QAAQ,CAAC,4BAA4B,EACrC,eAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC,4BAA4B,EAAE,QAAQ,CAAC,CAC/E,CACF,CACF,CAAC;;AApBN,sDAqBC"}
|
package/dist/cjs/Errors.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { AccessDeniedException, ConflictException, InternalServerException, ModelErrorException, ModelNotReadyException, ModelStreamErrorException, ModelTimeoutException, ResourceNotFoundException, ServiceQuotaExceededException, ServiceUnavailableException, ThrottlingException, ValidationException } from "@aws-sdk/client-bedrock-runtime";
|
|
2
2
|
import type { TaggedException } from "@effect-aws/commons";
|
|
3
|
-
import { SdkError as CommonSdkError } from "@effect-aws/commons";
|
|
4
3
|
export declare const AllServiceErrors: readonly ["AccessDeniedException", "ConflictException", "InternalServerException", "ModelErrorException", "ModelNotReadyException", "ModelStreamErrorException", "ModelTimeoutException", "ResourceNotFoundException", "ServiceQuotaExceededException", "ServiceUnavailableException", "ThrottlingException", "ValidationException"];
|
|
5
4
|
export type AccessDeniedError = TaggedException<AccessDeniedException>;
|
|
6
5
|
export type ConflictError = TaggedException<ConflictException>;
|
|
@@ -14,6 +13,7 @@ export type ServiceQuotaExceededError = TaggedException<ServiceQuotaExceededExce
|
|
|
14
13
|
export type ServiceUnavailableError = TaggedException<ServiceUnavailableException>;
|
|
15
14
|
export type ThrottlingError = TaggedException<ThrottlingException>;
|
|
16
15
|
export type ValidationError = TaggedException<ValidationException>;
|
|
17
|
-
export type SdkError =
|
|
18
|
-
|
|
16
|
+
export type SdkError = TaggedException<Error & {
|
|
17
|
+
name: "SdkError";
|
|
18
|
+
}>;
|
|
19
19
|
//# sourceMappingURL=Errors.d.ts.map
|
package/dist/cjs/Errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,6BAA6B,EAC7B,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,6BAA6B,EAC7B,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,eAAO,MAAM,gBAAgB,sUAanB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,qBAAqB,CAAC,CAAC;AACvE,MAAM,MAAM,aAAa,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAC/D,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,uBAAuB,CAAC,CAAC;AAC3E,MAAM,MAAM,UAAU,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;AAC9D,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC,sBAAsB,CAAC,CAAC;AACzE,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,yBAAyB,CAAC,CAAC;AAC1E,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,qBAAqB,CAAC,CAAC;AACvE,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,yBAAyB,CAAC,CAAC;AAC/E,MAAM,MAAM,yBAAyB,GAAG,eAAe,CAAC,6BAA6B,CAAC,CAAC;AACvF,MAAM,MAAM,uBAAuB,GAAG,eAAe,CAAC,2BAA2B,CAAC,CAAC;AACnF,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;AACnE,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;AACnE,MAAM,MAAM,QAAQ,GAAG,eAAe,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,CAAC"}
|
package/dist/cjs/Errors.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const commons_1 = require("@effect-aws/commons");
|
|
3
|
+
exports.AllServiceErrors = void 0;
|
|
5
4
|
exports.AllServiceErrors = [
|
|
6
5
|
"AccessDeniedException",
|
|
7
6
|
"ConflictException",
|
|
@@ -16,5 +15,4 @@ exports.AllServiceErrors = [
|
|
|
16
15
|
"ThrottlingException",
|
|
17
16
|
"ValidationException",
|
|
18
17
|
];
|
|
19
|
-
exports.SdkError = commons_1.SdkError;
|
|
20
18
|
//# sourceMappingURL=Errors.js.map
|
package/dist/cjs/Errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":";;;AAgBa,QAAA,gBAAgB,GAAG;IAC9B,uBAAuB;IACvB,mBAAmB;IACnB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,2BAA2B;IAC3B,uBAAuB;IACvB,2BAA2B;IAC3B,+BAA+B;IAC/B,6BAA6B;IAC7B,qBAAqB;IACrB,qBAAqB;CACb,CAAC"}
|
|
@@ -1,45 +1,50 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @since 1.0.0
|
|
3
3
|
*/
|
|
4
|
-
import { type ApplyGuardrailCommandInput, type ApplyGuardrailCommandOutput, type BedrockRuntimeClient, type BedrockRuntimeClientConfig, type ConverseCommandInput, type ConverseCommandOutput, type ConverseStreamCommandInput, type ConverseStreamCommandOutput, type GetAsyncInvokeCommandInput, type GetAsyncInvokeCommandOutput, type InvokeModelCommandInput, type InvokeModelCommandOutput, type InvokeModelWithResponseStreamCommandInput, type InvokeModelWithResponseStreamCommandOutput, type ListAsyncInvokesCommandInput, type ListAsyncInvokesCommandOutput, type StartAsyncInvokeCommandInput, type StartAsyncInvokeCommandOutput } from "@aws-sdk/client-bedrock-runtime";
|
|
5
|
-
import type { HttpHandlerOptions,
|
|
4
|
+
import { type ApplyGuardrailCommandInput, type ApplyGuardrailCommandOutput, type BedrockRuntimeClient, type BedrockRuntimeClientConfig, type ConverseCommandInput, type ConverseCommandOutput, type ConverseStreamCommandInput, type ConverseStreamCommandOutput, type GetAsyncInvokeCommandInput, type GetAsyncInvokeCommandOutput, type InvokeModelCommandInput, type InvokeModelCommandOutput, type InvokeModelWithBidirectionalStreamCommandInput, type InvokeModelWithBidirectionalStreamCommandOutput, type InvokeModelWithResponseStreamCommandInput, type InvokeModelWithResponseStreamCommandOutput, type ListAsyncInvokesCommandInput, type ListAsyncInvokesCommandOutput, type StartAsyncInvokeCommandInput, type StartAsyncInvokeCommandOutput } from "@aws-sdk/client-bedrock-runtime";
|
|
5
|
+
import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons";
|
|
6
|
+
import type { Cause } from "effect";
|
|
6
7
|
import { Effect, Layer } from "effect";
|
|
7
8
|
import * as Instance from "./BedrockRuntimeClientInstance.js";
|
|
8
|
-
import type { AccessDeniedError, ConflictError, InternalServerError, ModelError, ModelNotReadyError, ModelStreamError, ModelTimeoutError, ResourceNotFoundError, ServiceQuotaExceededError, ServiceUnavailableError, ThrottlingError, ValidationError } from "./Errors.js";
|
|
9
|
+
import type { AccessDeniedError, ConflictError, InternalServerError, ModelError, ModelNotReadyError, ModelStreamError, ModelTimeoutError, ResourceNotFoundError, SdkError, ServiceQuotaExceededError, ServiceUnavailableError, ThrottlingError, ValidationError } from "./Errors.js";
|
|
9
10
|
interface BedrockRuntimeService$ {
|
|
10
11
|
readonly _: unique symbol;
|
|
11
12
|
/**
|
|
12
13
|
* @see {@link ApplyGuardrailCommand}
|
|
13
14
|
*/
|
|
14
|
-
applyGuardrail(args: ApplyGuardrailCommandInput, options?: HttpHandlerOptions): Effect.Effect<ApplyGuardrailCommandOutput, SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | ServiceQuotaExceededError | ThrottlingError | ValidationError>;
|
|
15
|
+
applyGuardrail(args: ApplyGuardrailCommandInput, options?: HttpHandlerOptions): Effect.Effect<ApplyGuardrailCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | ServiceQuotaExceededError | ThrottlingError | ValidationError>;
|
|
15
16
|
/**
|
|
16
17
|
* @see {@link ConverseCommand}
|
|
17
18
|
*/
|
|
18
|
-
converse(args: ConverseCommandInput, options?: HttpHandlerOptions): Effect.Effect<ConverseCommandOutput, SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelTimeoutError | ResourceNotFoundError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
19
|
+
converse(args: ConverseCommandInput, options?: HttpHandlerOptions): Effect.Effect<ConverseCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelTimeoutError | ResourceNotFoundError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
19
20
|
/**
|
|
20
21
|
* @see {@link ConverseStreamCommand}
|
|
21
22
|
*/
|
|
22
|
-
converseStream(args: ConverseStreamCommandInput, options?: HttpHandlerOptions): Effect.Effect<ConverseStreamCommandOutput, SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelTimeoutError | ResourceNotFoundError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
23
|
+
converseStream(args: ConverseStreamCommandInput, options?: HttpHandlerOptions): Effect.Effect<ConverseStreamCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelTimeoutError | ResourceNotFoundError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
23
24
|
/**
|
|
24
25
|
* @see {@link GetAsyncInvokeCommand}
|
|
25
26
|
*/
|
|
26
|
-
getAsyncInvoke(args: GetAsyncInvokeCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetAsyncInvokeCommandOutput, SdkError | AccessDeniedError | InternalServerError | ThrottlingError | ValidationError>;
|
|
27
|
+
getAsyncInvoke(args: GetAsyncInvokeCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetAsyncInvokeCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ThrottlingError | ValidationError>;
|
|
27
28
|
/**
|
|
28
29
|
* @see {@link InvokeModelCommand}
|
|
29
30
|
*/
|
|
30
|
-
invokeModel(args: InvokeModelCommandInput, options?: HttpHandlerOptions): Effect.Effect<InvokeModelCommandOutput, SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelTimeoutError | ResourceNotFoundError | ServiceQuotaExceededError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
31
|
+
invokeModel(args: InvokeModelCommandInput, options?: HttpHandlerOptions): Effect.Effect<InvokeModelCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelTimeoutError | ResourceNotFoundError | ServiceQuotaExceededError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
32
|
+
/**
|
|
33
|
+
* @see {@link InvokeModelWithBidirectionalStreamCommand}
|
|
34
|
+
*/
|
|
35
|
+
invokeModelWithBidirectionalStream(args: InvokeModelWithBidirectionalStreamCommandInput, options?: HttpHandlerOptions): Effect.Effect<InvokeModelWithBidirectionalStreamCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelStreamError | ModelTimeoutError | ResourceNotFoundError | ServiceQuotaExceededError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
31
36
|
/**
|
|
32
37
|
* @see {@link InvokeModelWithResponseStreamCommand}
|
|
33
38
|
*/
|
|
34
|
-
invokeModelWithResponseStream(args: InvokeModelWithResponseStreamCommandInput, options?: HttpHandlerOptions): Effect.Effect<InvokeModelWithResponseStreamCommandOutput, SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelStreamError | ModelTimeoutError | ResourceNotFoundError | ServiceQuotaExceededError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
39
|
+
invokeModelWithResponseStream(args: InvokeModelWithResponseStreamCommandInput, options?: HttpHandlerOptions): Effect.Effect<InvokeModelWithResponseStreamCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ModelError | ModelNotReadyError | ModelStreamError | ModelTimeoutError | ResourceNotFoundError | ServiceQuotaExceededError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
35
40
|
/**
|
|
36
41
|
* @see {@link ListAsyncInvokesCommand}
|
|
37
42
|
*/
|
|
38
|
-
listAsyncInvokes(args: ListAsyncInvokesCommandInput, options?: HttpHandlerOptions): Effect.Effect<ListAsyncInvokesCommandOutput, SdkError | AccessDeniedError | InternalServerError | ThrottlingError | ValidationError>;
|
|
43
|
+
listAsyncInvokes(args: ListAsyncInvokesCommandInput, options?: HttpHandlerOptions): Effect.Effect<ListAsyncInvokesCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ThrottlingError | ValidationError>;
|
|
39
44
|
/**
|
|
40
45
|
* @see {@link StartAsyncInvokeCommand}
|
|
41
46
|
*/
|
|
42
|
-
startAsyncInvoke(args: StartAsyncInvokeCommandInput, options?: HttpHandlerOptions): Effect.Effect<StartAsyncInvokeCommandOutput, SdkError | AccessDeniedError | ConflictError | InternalServerError | ResourceNotFoundError | ServiceQuotaExceededError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
47
|
+
startAsyncInvoke(args: StartAsyncInvokeCommandInput, options?: HttpHandlerOptions): Effect.Effect<StartAsyncInvokeCommandOutput, Cause.TimeoutException | SdkError | AccessDeniedError | ConflictError | InternalServerError | ResourceNotFoundError | ServiceQuotaExceededError | ServiceUnavailableError | ThrottlingError | ValidationError>;
|
|
43
48
|
}
|
|
44
49
|
/**
|
|
45
50
|
* @since 1.0.0
|
|
@@ -47,7 +52,7 @@ interface BedrockRuntimeService$ {
|
|
|
47
52
|
*/
|
|
48
53
|
export declare const makeBedrockRuntimeService: Effect.Effect<BedrockRuntimeService$, never, Instance.BedrockRuntimeClientInstance>;
|
|
49
54
|
declare const BedrockRuntimeService_base: import("effect/Context").TagClass<BedrockRuntimeService, "@effect-aws/client-bedrock-runtime/BedrockRuntimeService", BedrockRuntimeService$> & Effect.Tag.Proxy<BedrockRuntimeService, BedrockRuntimeService$> & {
|
|
50
|
-
use: <X>(body: (_: BedrockRuntimeService$) => X) => [X] extends [Effect.Effect<infer A, infer E, infer R>] ? Effect.Effect<A, E, BedrockRuntimeService | R> : [X] extends [PromiseLike<infer A_1>] ? Effect.Effect<A_1,
|
|
55
|
+
use: <X>(body: (_: BedrockRuntimeService$) => X) => [X] extends [Effect.Effect<infer A, infer E, infer R>] ? Effect.Effect<A, E, BedrockRuntimeService | R> : [X] extends [PromiseLike<infer A_1>] ? Effect.Effect<A_1, Cause.UnknownException, BedrockRuntimeService> : Effect.Effect<X, never, BedrockRuntimeService>;
|
|
51
56
|
};
|
|
52
57
|
/**
|
|
53
58
|
* @since 1.0.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BedrockRuntimeService.d.ts","sourceRoot":"","sources":["../../src/BedrockRuntimeService.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAE/B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAE1B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAEhC,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAEhC,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAE7B,KAAK,yCAAyC,EAC9C,KAAK,0CAA0C,EAE/C,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAElC,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EACnC,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"BedrockRuntimeService.d.ts","sourceRoot":"","sources":["../../src/BedrockRuntimeService.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAE/B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAE1B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAEhC,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAEhC,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAE7B,K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xE,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,6BAA6B,GAAG,IAAI,CAAC;KACtE;CACF"}
|
package/dist/dts/Errors.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { AccessDeniedException, ConflictException, InternalServerException, ModelErrorException, ModelNotReadyException, ModelStreamErrorException, ModelTimeoutException, ResourceNotFoundException, ServiceQuotaExceededException, ServiceUnavailableException, ThrottlingException, ValidationException } from "@aws-sdk/client-bedrock-runtime";
|
|
2
2
|
import type { TaggedException } from "@effect-aws/commons";
|
|
3
|
-
import { SdkError as CommonSdkError } from "@effect-aws/commons";
|
|
4
3
|
export declare const AllServiceErrors: readonly ["AccessDeniedException", "ConflictException", "InternalServerException", "ModelErrorException", "ModelNotReadyException", "ModelStreamErrorException", "ModelTimeoutException", "ResourceNotFoundException", "ServiceQuotaExceededException", "ServiceUnavailableException", "ThrottlingException", "ValidationException"];
|
|
5
4
|
export type AccessDeniedError = TaggedException<AccessDeniedException>;
|
|
6
5
|
export type ConflictError = TaggedException<ConflictException>;
|
|
@@ -14,6 +13,7 @@ export type ServiceQuotaExceededError = TaggedException<ServiceQuotaExceededExce
|
|
|
14
13
|
export type ServiceUnavailableError = TaggedException<ServiceUnavailableException>;
|
|
15
14
|
export type ThrottlingError = TaggedException<ThrottlingException>;
|
|
16
15
|
export type ValidationError = TaggedException<ValidationException>;
|
|
17
|
-
export type SdkError =
|
|
18
|
-
|
|
16
|
+
export type SdkError = TaggedException<Error & {
|
|
17
|
+
name: "SdkError";
|
|
18
|
+
}>;
|
|
19
19
|
//# sourceMappingURL=Errors.d.ts.map
|
package/dist/dts/Errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,E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AACnF,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;AACnE,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;AACnE,MAAM,MAAM,QAAQ,GAAG,eAAe,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @since 1.0.0
|
|
3
3
|
*/
|
|
4
|
-
import { ApplyGuardrailCommand, ConverseCommand, ConverseStreamCommand, GetAsyncInvokeCommand, InvokeModelCommand, InvokeModelWithResponseStreamCommand, ListAsyncInvokesCommand, StartAsyncInvokeCommand, } from "@aws-sdk/client-bedrock-runtime";
|
|
4
|
+
import { ApplyGuardrailCommand, ConverseCommand, ConverseStreamCommand, GetAsyncInvokeCommand, InvokeModelCommand, InvokeModelWithBidirectionalStreamCommand, InvokeModelWithResponseStreamCommand, ListAsyncInvokesCommand, StartAsyncInvokeCommand, } from "@aws-sdk/client-bedrock-runtime";
|
|
5
5
|
import { Service } from "@effect-aws/commons";
|
|
6
6
|
import { Effect, Layer } from "effect";
|
|
7
7
|
import * as Instance from "./BedrockRuntimeClientInstance.js";
|
|
@@ -13,6 +13,7 @@ const commands = {
|
|
|
13
13
|
ConverseStreamCommand,
|
|
14
14
|
GetAsyncInvokeCommand,
|
|
15
15
|
InvokeModelCommand,
|
|
16
|
+
InvokeModelWithBidirectionalStreamCommand,
|
|
16
17
|
InvokeModelWithResponseStreamCommand,
|
|
17
18
|
ListAsyncInvokesCommand,
|
|
18
19
|
StartAsyncInvokeCommand,
|
|
@@ -23,7 +24,7 @@ const commands = {
|
|
|
23
24
|
*/
|
|
24
25
|
export const makeBedrockRuntimeService = Effect.gen(function* () {
|
|
25
26
|
const client = yield* Instance.BedrockRuntimeClientInstance;
|
|
26
|
-
return Service.fromClientAndCommands(client, commands, {
|
|
27
|
+
return yield* Service.fromClientAndCommands(client, commands, {
|
|
27
28
|
errorTags: AllServiceErrors,
|
|
28
29
|
resolveClientConfig: BedrockRuntimeServiceConfig.toBedrockRuntimeClientConfig,
|
|
29
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BedrockRuntimeService.js","sourceRoot":"","sources":["../../src/BedrockRuntimeService.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,qBAAqB,EAKrB,eAAe,EAGf,qBAAqB,EAGrB,qBAAqB,EAGrB,kBAAkB,EAGlB,oCAAoC,EAGpC,uBAAuB,EAGvB,uBAAuB,GAGxB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"BedrockRuntimeService.js","sourceRoot":"","sources":["../../src/BedrockRuntimeService.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,qBAAqB,EAKrB,eAAe,EAGf,qBAAqB,EAGrB,qBAAqB,EAGrB,kBAAkB,EAGlB,yCAAyC,EAGzC,oCAAoC,EAGpC,uBAAuB,EAGvB,uBAAuB,GAGxB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,2BAA2B,MAAM,kCAAkC,CAAC;AAgBhF,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,QAAQ,GAAG;IACf,qBAAqB;IACrB,eAAe;IACf,qBAAqB;IACrB,qBAAqB;IACrB,kBAAkB;IAClB,yCAAyC;IACzC,oCAAoC;IACpC,uBAAuB;IACvB,uBAAuB;CACxB,CAAC;AAgLF;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,GAAG,CAAC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"AccessDeniedException",
|
|
4
3
|
"ConflictException",
|
|
@@ -13,5 +12,4 @@ export const AllServiceErrors = [
|
|
|
13
12
|
"ThrottlingException",
|
|
14
13
|
"ValidationException",
|
|
15
14
|
];
|
|
16
|
-
export const SdkError = CommonSdkError;
|
|
17
15
|
//# sourceMappingURL=Errors.js.map
|
package/dist/esm/Errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,uBAAuB;IACvB,mBAAmB;IACnB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,2BAA2B;IAC3B,uBAAuB;IACvB,2BAA2B;IAC3B,+BAA+B;IAC/B,6BAA6B;IAC7B,qBAAqB;IACrB,qBAAqB;CACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-aws/client-bedrock-runtime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.2",
|
|
4
4
|
"description": "Effectful AWS Bedrock Runtime client",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"homepage": "https://floydspace.github.io/effect-aws/docs/client-bedrock-runtime",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@aws-sdk/client-bedrock-runtime": "^3",
|
|
19
|
-
"@effect-aws/commons": "^0.
|
|
19
|
+
"@effect-aws/commons": "^0.3.0"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"effect": ">=3.0.4 <4.0.0"
|
|
@@ -19,6 +19,9 @@ import {
|
|
|
19
19
|
InvokeModelCommand,
|
|
20
20
|
type InvokeModelCommandInput,
|
|
21
21
|
type InvokeModelCommandOutput,
|
|
22
|
+
InvokeModelWithBidirectionalStreamCommand,
|
|
23
|
+
type InvokeModelWithBidirectionalStreamCommandInput,
|
|
24
|
+
type InvokeModelWithBidirectionalStreamCommandOutput,
|
|
22
25
|
InvokeModelWithResponseStreamCommand,
|
|
23
26
|
type InvokeModelWithResponseStreamCommandInput,
|
|
24
27
|
type InvokeModelWithResponseStreamCommandOutput,
|
|
@@ -29,8 +32,9 @@ import {
|
|
|
29
32
|
type StartAsyncInvokeCommandInput,
|
|
30
33
|
type StartAsyncInvokeCommandOutput,
|
|
31
34
|
} from "@aws-sdk/client-bedrock-runtime";
|
|
32
|
-
import type { HttpHandlerOptions,
|
|
35
|
+
import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons";
|
|
33
36
|
import { Service } from "@effect-aws/commons";
|
|
37
|
+
import type { Cause } from "effect";
|
|
34
38
|
import { Effect, Layer } from "effect";
|
|
35
39
|
import * as Instance from "./BedrockRuntimeClientInstance.js";
|
|
36
40
|
import * as BedrockRuntimeServiceConfig from "./BedrockRuntimeServiceConfig.js";
|
|
@@ -43,6 +47,7 @@ import type {
|
|
|
43
47
|
ModelStreamError,
|
|
44
48
|
ModelTimeoutError,
|
|
45
49
|
ResourceNotFoundError,
|
|
50
|
+
SdkError,
|
|
46
51
|
ServiceQuotaExceededError,
|
|
47
52
|
ServiceUnavailableError,
|
|
48
53
|
ThrottlingError,
|
|
@@ -56,6 +61,7 @@ const commands = {
|
|
|
56
61
|
ConverseStreamCommand,
|
|
57
62
|
GetAsyncInvokeCommand,
|
|
58
63
|
InvokeModelCommand,
|
|
64
|
+
InvokeModelWithBidirectionalStreamCommand,
|
|
59
65
|
InvokeModelWithResponseStreamCommand,
|
|
60
66
|
ListAsyncInvokesCommand,
|
|
61
67
|
StartAsyncInvokeCommand,
|
|
@@ -72,6 +78,7 @@ interface BedrockRuntimeService$ {
|
|
|
72
78
|
options?: HttpHandlerOptions,
|
|
73
79
|
): Effect.Effect<
|
|
74
80
|
ApplyGuardrailCommandOutput,
|
|
81
|
+
| Cause.TimeoutException
|
|
75
82
|
| SdkError
|
|
76
83
|
| AccessDeniedError
|
|
77
84
|
| InternalServerError
|
|
@@ -89,6 +96,7 @@ interface BedrockRuntimeService$ {
|
|
|
89
96
|
options?: HttpHandlerOptions,
|
|
90
97
|
): Effect.Effect<
|
|
91
98
|
ConverseCommandOutput,
|
|
99
|
+
| Cause.TimeoutException
|
|
92
100
|
| SdkError
|
|
93
101
|
| AccessDeniedError
|
|
94
102
|
| InternalServerError
|
|
@@ -109,6 +117,7 @@ interface BedrockRuntimeService$ {
|
|
|
109
117
|
options?: HttpHandlerOptions,
|
|
110
118
|
): Effect.Effect<
|
|
111
119
|
ConverseStreamCommandOutput,
|
|
120
|
+
| Cause.TimeoutException
|
|
112
121
|
| SdkError
|
|
113
122
|
| AccessDeniedError
|
|
114
123
|
| InternalServerError
|
|
@@ -129,7 +138,7 @@ interface BedrockRuntimeService$ {
|
|
|
129
138
|
options?: HttpHandlerOptions,
|
|
130
139
|
): Effect.Effect<
|
|
131
140
|
GetAsyncInvokeCommandOutput,
|
|
132
|
-
SdkError | AccessDeniedError | InternalServerError | ThrottlingError | ValidationError
|
|
141
|
+
Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ThrottlingError | ValidationError
|
|
133
142
|
>;
|
|
134
143
|
|
|
135
144
|
/**
|
|
@@ -140,6 +149,7 @@ interface BedrockRuntimeService$ {
|
|
|
140
149
|
options?: HttpHandlerOptions,
|
|
141
150
|
): Effect.Effect<
|
|
142
151
|
InvokeModelCommandOutput,
|
|
152
|
+
| Cause.TimeoutException
|
|
143
153
|
| SdkError
|
|
144
154
|
| AccessDeniedError
|
|
145
155
|
| InternalServerError
|
|
@@ -153,6 +163,29 @@ interface BedrockRuntimeService$ {
|
|
|
153
163
|
| ValidationError
|
|
154
164
|
>;
|
|
155
165
|
|
|
166
|
+
/**
|
|
167
|
+
* @see {@link InvokeModelWithBidirectionalStreamCommand}
|
|
168
|
+
*/
|
|
169
|
+
invokeModelWithBidirectionalStream(
|
|
170
|
+
args: InvokeModelWithBidirectionalStreamCommandInput,
|
|
171
|
+
options?: HttpHandlerOptions,
|
|
172
|
+
): Effect.Effect<
|
|
173
|
+
InvokeModelWithBidirectionalStreamCommandOutput,
|
|
174
|
+
| Cause.TimeoutException
|
|
175
|
+
| SdkError
|
|
176
|
+
| AccessDeniedError
|
|
177
|
+
| InternalServerError
|
|
178
|
+
| ModelError
|
|
179
|
+
| ModelNotReadyError
|
|
180
|
+
| ModelStreamError
|
|
181
|
+
| ModelTimeoutError
|
|
182
|
+
| ResourceNotFoundError
|
|
183
|
+
| ServiceQuotaExceededError
|
|
184
|
+
| ServiceUnavailableError
|
|
185
|
+
| ThrottlingError
|
|
186
|
+
| ValidationError
|
|
187
|
+
>;
|
|
188
|
+
|
|
156
189
|
/**
|
|
157
190
|
* @see {@link InvokeModelWithResponseStreamCommand}
|
|
158
191
|
*/
|
|
@@ -161,6 +194,7 @@ interface BedrockRuntimeService$ {
|
|
|
161
194
|
options?: HttpHandlerOptions,
|
|
162
195
|
): Effect.Effect<
|
|
163
196
|
InvokeModelWithResponseStreamCommandOutput,
|
|
197
|
+
| Cause.TimeoutException
|
|
164
198
|
| SdkError
|
|
165
199
|
| AccessDeniedError
|
|
166
200
|
| InternalServerError
|
|
@@ -183,7 +217,7 @@ interface BedrockRuntimeService$ {
|
|
|
183
217
|
options?: HttpHandlerOptions,
|
|
184
218
|
): Effect.Effect<
|
|
185
219
|
ListAsyncInvokesCommandOutput,
|
|
186
|
-
SdkError | AccessDeniedError | InternalServerError | ThrottlingError | ValidationError
|
|
220
|
+
Cause.TimeoutException | SdkError | AccessDeniedError | InternalServerError | ThrottlingError | ValidationError
|
|
187
221
|
>;
|
|
188
222
|
|
|
189
223
|
/**
|
|
@@ -194,6 +228,7 @@ interface BedrockRuntimeService$ {
|
|
|
194
228
|
options?: HttpHandlerOptions,
|
|
195
229
|
): Effect.Effect<
|
|
196
230
|
StartAsyncInvokeCommandOutput,
|
|
231
|
+
| Cause.TimeoutException
|
|
197
232
|
| SdkError
|
|
198
233
|
| AccessDeniedError
|
|
199
234
|
| ConflictError
|
|
@@ -213,7 +248,7 @@ interface BedrockRuntimeService$ {
|
|
|
213
248
|
export const makeBedrockRuntimeService = Effect.gen(function*() {
|
|
214
249
|
const client = yield* Instance.BedrockRuntimeClientInstance;
|
|
215
250
|
|
|
216
|
-
return Service.fromClientAndCommands<BedrockRuntimeService$>(
|
|
251
|
+
return yield* Service.fromClientAndCommands<BedrockRuntimeService$>(
|
|
217
252
|
client,
|
|
218
253
|
commands,
|
|
219
254
|
{
|
package/src/Errors.ts
CHANGED
|
@@ -13,7 +13,6 @@ import type {
|
|
|
13
13
|
ValidationException,
|
|
14
14
|
} from "@aws-sdk/client-bedrock-runtime";
|
|
15
15
|
import type { TaggedException } from "@effect-aws/commons";
|
|
16
|
-
import { SdkError as CommonSdkError } from "@effect-aws/commons";
|
|
17
16
|
|
|
18
17
|
export const AllServiceErrors = [
|
|
19
18
|
"AccessDeniedException",
|
|
@@ -42,6 +41,4 @@ export type ServiceQuotaExceededError = TaggedException<ServiceQuotaExceededExce
|
|
|
42
41
|
export type ServiceUnavailableError = TaggedException<ServiceUnavailableException>;
|
|
43
42
|
export type ThrottlingError = TaggedException<ThrottlingException>;
|
|
44
43
|
export type ValidationError = TaggedException<ValidationException>;
|
|
45
|
-
|
|
46
|
-
export type SdkError = CommonSdkError;
|
|
47
|
-
export const SdkError = CommonSdkError;
|
|
44
|
+
export type SdkError = TaggedException<Error & { name: "SdkError" }>;
|