UNPKG

@genkit-ai/vertexai

Version:

Genkit AI framework plugin for Google Cloud Vertex AI APIs including Gemini APIs, Imagen, and more.

36 lines (33 loc) 1.46 kB
import * as genkit from 'genkit'; import { z, Genkit } from 'genkit'; import { IndexerAction } from 'genkit/retriever'; import { f as VertexVectorSearchOptions } from '../../types-DyPriOk2.js'; import '../../types-B3i-Lt7D.js'; import 'google-auth-library'; import '@google-cloud/vertexai'; import 'genkit/model'; import '@google-cloud/aiplatform'; import 'genkit/embedder'; /** * Creates a reference to a Vertex AI indexer. * * @param {Object} params - The parameters for the indexer reference. * @param {string} params.indexId - The ID of the Vertex AI index. * @param {string} [params.displayName] - An optional display name for the indexer. * @returns {Object} - The indexer reference object. */ declare const vertexAiIndexerRef: (params: { indexId: string; displayName?: string; }) => genkit.IndexerReference<z.ZodOptional<z.ZodAny>>; /** * Creates Vertex AI indexers. * * This function returns a list of indexer actions for Vertex AI based on the provided * vector search options and embedder configurations. * * @param {VertexVectorSearchOptions<EmbedderCustomOptions>} params - The parameters for creating the indexers. * @returns {IndexerAction<z.ZodTypeAny>[]} - An array of indexer actions. */ declare function vertexAiIndexers<EmbedderCustomOptions extends z.ZodTypeAny>(ai: Genkit, params: VertexVectorSearchOptions<EmbedderCustomOptions>): IndexerAction<z.ZodTypeAny>[]; export { vertexAiIndexerRef, vertexAiIndexers };