Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions js/plugins/vertexai/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import {
SUPPORTED_OPENAI_FORMAT_MODELS,
llama3,
llama31,
llama32,
modelGardenOpenaiCompatibleModel,
} from './model_garden.js';
import {
Expand Down Expand Up @@ -104,6 +105,7 @@ export {
imagen3Fast,
llama3,
llama31,
llama32,
textEmbedding004,
textEmbeddingGecko,
textEmbeddingGecko001,
Expand Down
19 changes: 18 additions & 1 deletion js/plugins/vertexai/src/model_garden.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,23 @@ export const ModelGardenModelConfigSchema = OpenAIConfigSchema.extend({
location: z.string().optional(),
});

export const llama32 = modelRef({
name: 'vertexai/llama-3.2',
info: {
label: 'Llama 3.2',
supports: {
multiturn: true,
tools: true,
media: true,
systemRole: true,
output: ['text', 'json'],
},
versions: ['meta/llama-3.2-90b-vision-instruct-maas'],
},
configSchema: ModelGardenModelConfigSchema,
version: 'meta/llama-3.2-90b-vision-instruct-maas',
});

export const llama31 = modelRef({
name: 'vertexai/llama-3.1',
info: {
Expand Down Expand Up @@ -72,6 +89,7 @@ export const llama3 = modelRef({
export const SUPPORTED_OPENAI_FORMAT_MODELS = {
'llama3-405b': llama3,
'llama-3.1': llama31,
'llama-3.2': llama32,
};

export function modelGardenOpenaiCompatibleModel(
Expand All @@ -87,7 +105,6 @@ export function modelGardenOpenaiCompatibleModel(
baseUrlTemplate =
'https://{location}-aiplatform.googleapis.com/v1beta1/projects/{projectId}/locations/{location}/endpoints/openapi';
}

const clientFactory = async (
request: GenerateRequest<typeof ModelGardenModelConfigSchema>
): Promise<OpenAI> => {
Expand Down
Loading