import { z, EmbedderReference, ActionMetadata, EmbedderAction } from 'genkit'; import { Model, GoogleAIPluginOptions } from './types.js'; import '../common/types.js'; /** * 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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * 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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * 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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * 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: { 'text-embedding-004': 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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * 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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * 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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; '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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * 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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * 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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * 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; 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: { 'text-embedding-004': 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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * 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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * 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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * By selecting a smaller output dimensionality, users can save memory and storage space, leading to more efficient computations. **/ outputDimensionality: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; '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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * 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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * 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, the model generates embeddings with 768 dimensions. Models such as * `text-embedding-004`, `text-embedding-005`, and `text-multilingual-embedding-002` * allow the output dimensionality to be adjusted between 1 and 768. * 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 EmbeddingConfig, EmbeddingConfigSchema, type EmbeddingConfigSchemaType, type KnownModels, TEST_ONLY, defineEmbedder, listActions, listKnownModels, model };