genkitx-aws-bedrock
    Preparing search index...

    Interface PluginOptions

    interface PluginOptions {
        apiVersion?: string;
        authSchemePreference?: string[] | Provider<string[]>;
        base64Decoder?: Decoder;
        base64Encoder?: Encoder;
        bodyLengthChecker?: BodyLengthCalculator;
        cacheMiddleware?: boolean;
        credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
        credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider;
        customModels?: string[];
        customUserAgent?: string | UserAgent;
        defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
        defaultUserAgentProvider?: Provider<UserAgent>;
        disableHostPrefix?: boolean;
        endpoint?: (string | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>) & (string | Provider<string> | Endpoint | Provider<...> | EndpointV2 | Provider<...>);
        endpointProvider?: (
            params: EndpointParameters,
            context?: { logger?: Logger },
        ) => EndpointV2;
        eventStreamPayloadHandlerProvider?: EventStreamPayloadHandlerProvider;
        eventStreamSerdeProvider?: EventStreamSerdeProvider;
        extensions?: RuntimeExtension[];
        httpAuthSchemeProvider?: BedrockRuntimeHttpAuthSchemeProvider;
        httpAuthSchemes?: HttpAuthScheme[];
        logger?: Logger;
        maxAttempts?: number | Provider<number>;
        profile?: string;
        protocol?:
            | ClientProtocol<any, any>
            | $ClientProtocol<any, any>
            | ClientProtocolCtor<any, any>
            | $ClientProtocolCtor<any, any>;
        protocolSettings?: {
            defaultNamespace?: string;
            [setting: string]: unknown;
        };
        region?: (string | Provider<string>) & (string | Provider<string | undefined>);
        requestHandler?: (RequestHandler<any, any, HttpHandlerOptions> | NodeHttpHandlerOptions | FetchHttpHandlerOptions | Record<...>) & HttpHandlerUserInput;
        retryMode?: string
        | Provider<string>;
        retryStrategy?: RetryStrategy | RetryStrategyV2;
        runtime?: string;
        serviceConfiguredEndpoint?: undefined;
        serviceId?: string;
        sha256?: ChecksumConstructor | HashConstructor;
        signer?:
            | RequestSigner
            | ((authScheme?: AuthScheme) => Promise<RequestSigner>);
        signerConstructor?: new (
            options: SignatureV4Init & SignatureV4CryptoInit,
        ) => RequestSigner;
        signingEscapePath?: boolean;
        signingRegion?: string;
        streamCollector?: StreamCollector;
        systemClockOffset?: number;
        tls?: boolean;
        token?: TokenIdentity | TokenIdentityProvider;
        urlParser?: UrlParser;
        useDualstackEndpoint?: (boolean | Provider<boolean>) & (boolean | Provider<boolean | undefined>);
        useFipsEndpoint?: (boolean | Provider<boolean>) & (boolean | Provider<boolean | undefined>);
        userAgentAppId?: string | Provider<string | undefined>;
        utf8Decoder?: Decoder;
        utf8Encoder?: Encoder;
    }

    Hierarchy

    • BedrockRuntimeClientConfig
      • PluginOptions
    Index

    Properties

    apiVersion?: string

    The API version set internally by the SDK, and is not planned to be used by customer code.

    authSchemePreference?: string[] | Provider<string[]>

    A comma-separated list of case-sensitive auth scheme names. An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed. For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.

    base64Decoder?: Decoder

    The function that will be used to convert a base64-encoded string to a byte array.

    base64Encoder?: Encoder

    The function that will be used to convert binary data to a base64-encoded string.

    bodyLengthChecker?: BodyLengthCalculator

    A function that can calculate the length of a request body.

    cacheMiddleware?: boolean

    Default false.

    When true, the client will only resolve the middleware stack once per Command class. This means modifying the middlewareStack of the command or client after requests have been made will not be recognized.

    Calling client.destroy() also clears this cache.

    Enable this only if needing the additional time saved (0-1ms per request) and not needing middleware modifications between requests.

    credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider

    Default credentials provider; Not available in browser runtime.

    credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider

    The credentials used to sign requests.

    customModels?: string[]

    Additional model names to register that are not in the predefined list. These models will be available using the 'aws-bedrock/model-name' format.

    ['custom.my-custom-model-v1:0']
    
    customUserAgent?: string | UserAgent

    The custom user agent header that would be appended to default one

    defaultsMode?: DefaultsMode | Provider<DefaultsMode>

    The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK.

    defaultUserAgentProvider?: Provider<UserAgent>

    The provider populating default tracking information to be sent with user-agent, x-amz-user-agent header

    disableHostPrefix?: boolean

    Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation.

    endpoint?: (string | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>) & (string | Provider<string> | Endpoint | Provider<...> | EndpointV2 | Provider<...>)

    The fully qualified endpoint of the webservice. This is only for using a custom endpoint (for example, when using a local version of S3).

    Endpoint transformations such as S3 applying a bucket to the hostname are still applicable to this custom endpoint.

    endpointProvider?: (
        params: EndpointParameters,
        context?: { logger?: Logger },
    ) => EndpointV2

    Providing a custom endpointProvider will override built-in transformations of the endpoint such as S3 adding the bucket name to the hostname, since they are part of the default endpointProvider.

    eventStreamPayloadHandlerProvider?: EventStreamPayloadHandlerProvider

    The function that provides necessary utilities for handling request event stream.

    eventStreamSerdeProvider?: EventStreamSerdeProvider

    The function that provides necessary utilities for generating and parsing event stream

    extensions?: RuntimeExtension[]

    Optional extensions

    httpAuthSchemeProvider?: BedrockRuntimeHttpAuthSchemeProvider

    Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.

    httpAuthSchemes?: HttpAuthScheme[]

    Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.

    logger?: Logger

    Optional logger for logging debug/info/warn/error.

    maxAttempts?: number | Provider<number>

    Value for how many times a request will be made at most in case of retry.

    profile?: string

    Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.

    When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.

    For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options.

    protocol?:
        | ClientProtocol<any, any>
        | $ClientProtocol<any, any>
        | ClientProtocolCtor<any, any>
        | $ClientProtocolCtor<any, any>

    A client request/response protocol or constructor of one. A protocol in this context is not e.g. https. It is the combined implementation of how to (de)serialize and create the messages (e.g. http requests/responses) that are being exchanged.

    protocolSettings?: { defaultNamespace?: string; [setting: string]: unknown }

    These are automatically generated and will be passed to the config.protocol if given as a constructor.

    region?: (string | Provider<string>) & (string | Provider<string | undefined>)

    The AWS region to which this client will send requests

    requestHandler?: (RequestHandler<any, any, HttpHandlerOptions> | NodeHttpHandlerOptions | FetchHttpHandlerOptions | Record<...>) & HttpHandlerUserInput
    retryMode?: string | Provider<string>

    Specifies which retry algorithm to use.

    retryStrategy?: RetryStrategy | RetryStrategyV2

    The strategy to retry the request. Using built-in exponential backoff strategy by default.

    runtime?: string

    The runtime environment.

    serviceConfiguredEndpoint?: undefined

    This field is used internally so you should not fill any value to this field.

    serviceId?: string

    Unique service identifier.

    sha256?: ChecksumConstructor | HashConstructor

    A constructor for a class implementing the @smithy/types#ChecksumConstructor interface that computes the SHA-256 HMAC or checksum of a string or binary buffer.

    signer?: RequestSigner | ((authScheme?: AuthScheme) => Promise<RequestSigner>)

    The signer to use when signing requests.

    signerConstructor?: new (
        options: SignatureV4Init & SignatureV4CryptoInit,
    ) => RequestSigner

    The injectable SigV4-compatible signer class constructor. If not supplied, regular SignatureV4 constructor will be used.

    signingEscapePath?: boolean

    Whether to escape request path when signing the request.

    signingRegion?: string

    The region where you want to sign your request against. This can be different to the region in the endpoint.

    streamCollector?: StreamCollector

    A function that converts a stream into an array of bytes.

    systemClockOffset?: number

    An offset value in milliseconds to apply to all signing times.

    tls?: boolean

    Whether TLS is enabled for requests.

    token?: TokenIdentity | TokenIdentityProvider

    The token used to authenticate requests.

    urlParser?: UrlParser

    The function that will be used to convert strings into HTTP endpoints.

    useDualstackEndpoint?: (boolean | Provider<boolean>) & (boolean | Provider<boolean | undefined>)

    Enables IPv6/IPv4 dualstack endpoint.

    useFipsEndpoint?: (boolean | Provider<boolean>) & (boolean | Provider<boolean | undefined>)

    Enables FIPS compatible endpoints.

    userAgentAppId?: string | Provider<string | undefined>

    The application ID used to identify the application.

    utf8Decoder?: Decoder

    The function that will be used to convert a UTF8-encoded string to a byte array.

    utf8Encoder?: Encoder

    The function that will be used to convert binary data to a UTF-8 encoded string.