Skip to content

Commit

Permalink
chore: add all vertex models to the dev-ui-gallery test app
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDoyle committed Jan 30, 2025
1 parent fc708c9 commit e935090
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions js/testapps/dev-ui-gallery/src/genkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import { devLocalVectorstore } from '@genkit-ai/dev-local-vectorstore';
import { genkitEval, GenkitMetric } from '@genkit-ai/evaluator';
import { enableFirebaseTelemetry } from '@genkit-ai/firebase';
import { gemini15Flash, googleAI } from '@genkit-ai/googleai';
import { textEmbedding004, vertexAI } from '@genkit-ai/vertexai';
import {
Expand All @@ -24,6 +25,15 @@ import {
} from '@genkit-ai/vertexai/evaluation';
import {
claude35Sonnet,
claude35SonnetV2,
claude3Haiku,
claude3Opus,
claude3Sonnet,
codestral,
llama31,
llama32,
mistralLarge,
mistralNemo,
vertexAIModelGarden,
} from '@genkit-ai/vertexai/modelgarden';
import { genkit } from 'genkit';
Expand All @@ -34,6 +44,17 @@ import { pinecone } from 'genkitx-pinecone';

logger.setLogLevel('info');

enableFirebaseTelemetry({
forceDevExport: true,
metricExportIntervalMillis: 5000,
autoInstrumentation: true,
autoInstrumentationConfig: {
'@opentelemetry/instrumentation-fs': { enabled: false },
'@opentelemetry/instrumentation-dns': { enabled: false },
'@opentelemetry/instrumentation-net': { enabled: false },
},
});

// Turn off safety checks for evaluation so that the LLM as an evaluator can
// respond appropriately to potentially harmful content without error.
export const PERMISSIVE_SAFETY_SETTINGS: any = {
Expand Down Expand Up @@ -77,8 +98,20 @@ export const ai = genkit({
location: 'us-central1',
}),
vertexAIModelGarden({
location: 'us-central1',
models: [claude35Sonnet],
location: 'us-central1', // gemini, llama
// location: 'us-east5', // anthropic
models: [
claude35Sonnet,
claude35SonnetV2,
claude3Haiku,
claude3Opus,
claude3Sonnet,
codestral,
llama31,
llama32,
mistralLarge,
mistralNemo,
],
}),
vertexAIEvaluation({
location: 'us-central1',
Expand Down

0 comments on commit e935090

Please sign in to comment.