Open History to see the last commit
1/**
2 * Provider options for Gemini embedding models.
3 *
4 * `dimensions` is deliberately absent: it's a first-class top-level option on
5 * `embed()` and is mapped to the SDK's `outputDimensionality` by the adapter.
6 */
7export interface GeminiEmbeddingProviderOptions {
8 /**
9 * Type of task for which the embedding will be used. Helps the model
10 * produce embeddings optimized for the intended use case.
11 *
12 * @see https://ai.google.dev/gemini-api/docs/embeddings#task-types
13 */
14 taskType?:
15 | 'SEMANTIC_SIMILARITY'
16 | 'CLASSIFICATION'
17 | 'CLUSTERING'
18 | 'RETRIEVAL_DOCUMENT'
19 | 'RETRIEVAL_QUERY'
20 | 'QUESTION_ANSWERING'
21 | 'FACT_VERIFICATION'
22 | 'CODE_RETRIEVAL_QUERY'
23
24 /**
25 * Title for the text. Only applicable when `taskType` is
26 * `RETRIEVAL_DOCUMENT`.
27 */
28 title?: string
29}