Skip to content

@awssolutions/gen-ai-evaluation-toolkit-ts-client


@awssolutions/gen-ai-evaluation-toolkit-ts-client / ClientDefaults

Interface: ClientDefaults

Extends

  • Partial\<__SmithyConfiguration\<__HttpHandlerOptions>>

Properties

base64Decoder?

optional base64Decoder?: Decoder

Internal

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


base64Encoder?

optional base64Encoder?: Encoder

Internal

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


bodyLengthChecker?

optional bodyLengthChecker?: BodyLengthCalculator

Internal

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


~~credentialDefaultProvider?~~

optional credentialDefaultProvider?: (input) => AwsCredentialIdentityProvider

Internal

Default credentials provider; Not available in browser runtime.

Parameters

input

any

Returns

AwsCredentialIdentityProvider

Deprecated


defaultsMode?

optional 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?

optional defaultUserAgentProvider?: Provider\<UserAgent>

Internal

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


disableHostPrefix?

optional disableHostPrefix?: boolean

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


extensions?

optional extensions?: RuntimeExtension[]

Optional extensions


logger?

optional logger?: Logger

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


maxAttempts?

optional maxAttempts?: number | Provider\<number>

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


profile?

optional 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.


region?

optional region?: string | Provider\<string>

The AWS region to which this client will send requests


requestHandler?

optional requestHandler?: HttpHandlerUserInput

The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.

Overrides

Partial.requestHandler


retryMode?

optional retryMode?: string | Provider\<string>

Specifies which retry algorithm to use.

See

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/


runtime?

optional runtime?: string

Internal

The runtime environment.


serviceId?

optional serviceId?: string

Internal

Unique service identifier.


sha256?

optional sha256?: ChecksumConstructor | HashConstructor

Internal

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.


streamCollector?

optional streamCollector?: StreamCollector

Internal

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


urlParser?

optional urlParser?: UrlParser

Internal

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


useDualstackEndpoint?

optional useDualstackEndpoint?: boolean | Provider\<boolean>

Enables IPv6/IPv4 dualstack endpoint.


useFipsEndpoint?

optional useFipsEndpoint?: boolean | Provider\<boolean>

Enables FIPS compatible endpoints.


utf8Decoder?

optional utf8Decoder?: Decoder

Internal

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


utf8Encoder?

optional utf8Encoder?: Encoder

Internal

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