Skip to content

@chinmaymk/aikit v0.0.40


@chinmaymk/aikit / GoogleEmbeddingOptions

Interface: GoogleEmbeddingOptions

Defined in: types.ts:282

Google Gemini-specific embedding options. Extends the base embedding options with Google-specific parameters.

Extends

Properties

model?

optional model: string

Defined in: types.ts:233

The specific embedding model you want to use. e.g., 'text-embedding-3-small' or 'text-embedding-004'.

Inherited from

Omit.model


dimensions?

optional dimensions: number

Defined in: types.ts:235

The number of dimensions in the output embeddings. Only supported by some models.

Inherited from

Omit.dimensions


autoTruncate?

optional autoTruncate: boolean

Defined in: types.ts:239

Whether to automatically truncate input text that exceeds the model's limit.

Inherited from

Omit.autoTruncate


apiKey?

optional apiKey: string

Defined in: types.ts:248

API key for authentication with the provider.

Inherited from

Omit.apiKey


baseURL?

optional baseURL: string

Defined in: types.ts:250

Custom base URL for the API endpoint.

Inherited from

Omit.baseURL


timeout?

optional timeout: number

Defined in: types.ts:252

Request timeout in milliseconds.

Inherited from

Omit.timeout


maxRetries?

optional maxRetries: number

Defined in: types.ts:254

Maximum number of retry attempts for failed requests.

Inherited from

Omit.maxRetries


mutateHeaders()?

optional mutateHeaders: (headers) => void

Defined in: types.ts:260

A function that allows you to modify the headers before a request is sent. This is useful for adding custom headers or modifying existing ones.

Parameters

headers

Record<string, string>

The original headers object to mutate directly.

Returns

void

Inherited from

Omit.mutateHeaders


outputDtype?

optional outputDtype: "float" | "int8" | "uint8" | "binary" | "ubinary"

Defined in: types.ts:284

Output data type for the embeddings.


title?

optional title: string

Defined in: types.ts:286

Optional title for the text when task type is 'document'.


taskType?

optional taskType: "RETRIEVAL_QUERY" | "RETRIEVAL_DOCUMENT" | "SEMANTIC_SIMILARITY" | "CLASSIFICATION" | "CLUSTERING" | "QUESTION_ANSWERING" | "FACT_VERIFICATION" | "CODE_RETRIEVAL_QUERY"

Defined in: types.ts:288

Task type specific to Google's API format.

Released under the MIT License.