@genkit-ai/vertexai
Version:
Genkit AI framework plugin for Google Cloud Vertex AI APIs including Gemini APIs, Imagen, and more.
53 lines (49 loc) • 2.85 kB
text/typescript
import { z, ModelReference, EmbedderReference } from 'genkit';
import { GenkitPlugin } from 'genkit/plugin';
import { P as PluginOptions, S as SUPPORTED_GEMINI_MODELS, G as GeminiConfigSchema } from './types-B3i-Lt7D.mjs';
export { a as GeminiConfig, b as GeminiVersionString, c as SafetySettingsSchema, g as gemini, d as gemini10Pro, e as gemini15Flash, f as gemini15Pro, h as gemini20Flash, i as gemini20Flash001, j as gemini20FlashLite, k as gemini20FlashLitePreview0205, l as gemini20ProExp0205, m as gemini25FlashLite, n as gemini25FlashPreview0417, o as gemini25ProExp0325, p as gemini25ProPreview0325 } from './types-B3i-Lt7D.mjs';
import { VertexEmbeddingConfig, VertexEmbeddingConfigSchema } from './embedder.mjs';
export { geminiEmbedding001, multimodalEmbedding001, textEmbedding004, textEmbedding005, textEmbeddingGecko003, textEmbeddingGeckoMultilingual001, textMultilingualEmbedding002 } from './embedder.mjs';
import { ACTUAL_IMAGEN_MODELS, ImagenConfigSchema } from './imagen.mjs';
export { imagen2, imagen3, imagen3Fast } from './imagen.mjs';
import 'google-auth-library';
import '@google-cloud/vertexai';
import 'genkit/model';
import 'genkit/embedder';
/**
* @license
*
* Copyright 2024 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.
*/
/**
* @module /
*/
/**
* @deprecated
*/
type VertexAIPlugin = {
(params?: PluginOptions): GenkitPlugin;
model(name: keyof typeof SUPPORTED_GEMINI_MODELS | (`gemini-${string}` & {}), config?: z.infer<typeof GeminiConfigSchema>): ModelReference<typeof GeminiConfigSchema>;
model(name: keyof typeof ACTUAL_IMAGEN_MODELS | (`imagen${string}` & {}), config?: z.infer<typeof ImagenConfigSchema>): ModelReference<typeof ImagenConfigSchema>;
model(name: string, config?: any): ModelReference<z.ZodTypeAny>;
embedder(name: string, config?: VertexEmbeddingConfig): EmbedderReference<typeof VertexEmbeddingConfigSchema>;
};
/**
* Google Cloud Vertex AI plugin for Genkit.
* Includes Gemini and Imagen models and text embedder.
* @deprecated Please use `import { vertexAI } from '@genkit-ai/google-genai';` instead. Replace model constants with e.g. vertexAI.model('gemini-2.5-pro')
*/
declare const vertexAI: VertexAIPlugin;
export { GeminiConfigSchema, ImagenConfigSchema, PluginOptions, type VertexAIPlugin, vertexAI as default, vertexAI };