1.10.3 • Published 5 months ago

@effect-aws/client-bedrock-runtime v1.10.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@effect-aws/client-bedrock-runtime

npm version npm downloads

Installation

npm install --save @effect-aws/client-bedrock-runtime

Usage

With default BedrockRuntimeClient instance:

import { BedrockRuntime } from "@effect-aws/client-bedrock-runtime";

const program = BedrockRuntime.invokeModel(args);

const result = pipe(
  program,
  Effect.provide(BedrockRuntime.defaultLayer),
  Effect.runPromise,
);

With custom BedrockRuntimeClient instance:

import { BedrockRuntime } from "@effect-aws/client-bedrock-runtime";

const program = BedrockRuntime.invokeModel(args);

const result = await pipe(
  program,
  Effect.provide(
    BedrockRuntime.baseLayer(() => new BedrockRuntimeClient({ region: "eu-central-1" })),
  ),
  Effect.runPromise,
);

With custom BedrockRuntimeClient configuration:

import { BedrockRuntime } from "@effect-aws/client-bedrock-runtime";

const program = BedrockRuntime.invokeModel(args);

const result = await pipe(
  program,
  Effect.provide(BedrockRuntime.layer({ region: "eu-central-1" })),
  Effect.runPromiseExit,
);

or use BedrockRuntime.baseLayer((default) => new BedrockRuntimeClient({ ...default, region: "eu-central-1" }))

1.10.3

5 months ago

1.10.2

5 months ago

1.10.0

5 months ago

1.9.5

6 months ago

1.9.3

7 months ago

1.9.2

7 months ago