import { z, EmbedderReference, EmbedderAction, ActionMetadata } from 'genkit'; import { GoogleAIPluginOptions, Model } from './types.mjs'; import '../common/interaction-types.mjs'; import '../common/types.mjs'; /** * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ declare const EmbeddingConfigSchema: z.ZodObject<{ /** Override the API key provided at plugin initialization. */ apiKey: z.ZodOptional; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ /** Override the API key provided at plugin initialization. */ apiKey: z.ZodOptional; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ /** Override the API key provided at plugin initialization. */ apiKey: z.ZodOptional; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; type EmbeddingConfigSchemaType = typeof EmbeddingConfigSchema; type EmbeddingConfig = z.infer; type ConfigSchemaType = EmbeddingConfigSchemaType; declare const KNOWN_MODELS: { readonly 'gemini-embedding-001': EmbedderReference; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ /** Override the API key provided at plugin initialization. */ apiKey: z.ZodOptional; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ /** Override the API key provided at plugin initialization. */ apiKey: z.ZodOptional; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; readonly 'gemini-embedding-2': EmbedderReference; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ /** Override the API key provided at plugin initialization. */ apiKey: z.ZodOptional; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ /** Override the API key provided at plugin initialization. */ apiKey: z.ZodOptional; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; }; type KnownModels = keyof typeof KNOWN_MODELS; type EmbedderModelName = `gemini-embedding-${string}`; declare function isEmbedderName(value: string): value is EmbedderModelName; declare function model(version: string, config?: EmbeddingConfig): EmbedderReference; declare function listActions(models: Model[]): ActionMetadata[]; declare function listKnownModels(options?: GoogleAIPluginOptions): EmbedderAction[]; declare function defineEmbedder(name: string, pluginOptions?: GoogleAIPluginOptions): EmbedderAction; declare const TEST_ONLY: { KNOWN_MODELS: { readonly 'gemini-embedding-001': EmbedderReference; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ /** Override the API key provided at plugin initialization. */ apiKey: z.ZodOptional; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ /** Override the API key provided at plugin initialization. */ apiKey: z.ZodOptional; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; readonly 'gemini-embedding-2': EmbedderReference; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ /** Override the API key provided at plugin initialization. */ apiKey: z.ZodOptional; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ /** Override the API key provided at plugin initialization. */ apiKey: z.ZodOptional; /** * The `task_type` parameter is defined as the intended downstream application to help the model * produce better quality embeddings. **/ taskType: z.ZodOptional>; title: z.ZodOptional; version: z.ZodOptional; /** * The `outputDimensionality` parameter allows you to specify the dimensionality of the embedding output. * By default, `gemini-embedding-2` and `gemini-embedding-001` generate embeddings with 3072 dimensions. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; }; }; export { type EmbedderModelName, type EmbeddingConfig, EmbeddingConfigSchema, type EmbeddingConfigSchemaType, type KnownModels, TEST_ONLY, defineEmbedder, isEmbedderName, listActions, listKnownModels, model };