Example

const model = new BedrockChat({
model: "anthropic.claude-v2",
region: "us-east-1",
});
const res = await model.invoke([{ content: "Tell me a joke" }]);
console.log(res);

Hierarchy

Constructors

  • Parameters

    • Optional fields: Partial<BaseBedrockInput> & BaseLanguageModelParams

    Returns BedrockChat

Properties

codec: EventStreamCodec = ...
credentials: CredentialType
fetchFn: ((input, init?) => Promise<Response>)

Type declaration

    • (input, init?): Promise<Response>
    • Parameters

      • input: RequestInfo | URL
      • Optional init: RequestInit

      Returns Promise<Response>

model: string = "amazon.titan-tg1-large"
region: string
streaming: boolean = false
endpointHost?: string
maxTokens?: number = undefined
modelKwargs?: Record<string, unknown>
stopSequences?: string[]

Deprecated

temperature?: number = undefined

Generated using TypeDoc