Skip to content

Commit 4510fff

Browse files
authored
feat(js): add llama-3.2 support to model garden plugin (#969)
1 parent 49c0352 commit 4510fff

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

js/plugins/vertexai/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ import {
6666
SUPPORTED_OPENAI_FORMAT_MODELS,
6767
llama3,
6868
llama31,
69+
llama32,
6970
modelGardenOpenaiCompatibleModel,
7071
} from './model_garden.js';
7172
import {
@@ -104,6 +105,7 @@ export {
104105
imagen3Fast,
105106
llama3,
106107
llama31,
108+
llama32,
107109
textEmbedding004,
108110
textEmbeddingGecko,
109111
textEmbeddingGecko001,

js/plugins/vertexai/src/model_garden.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,23 @@ export const ModelGardenModelConfigSchema = OpenAIConfigSchema.extend({
2929
location: z.string().optional(),
3030
});
3131

32+
export const llama32 = modelRef({
33+
name: 'vertexai/llama-3.2',
34+
info: {
35+
label: 'Llama 3.2',
36+
supports: {
37+
multiturn: true,
38+
tools: true,
39+
media: true,
40+
systemRole: true,
41+
output: ['text', 'json'],
42+
},
43+
versions: ['meta/llama-3.2-90b-vision-instruct-maas'],
44+
},
45+
configSchema: ModelGardenModelConfigSchema,
46+
version: 'meta/llama-3.2-90b-vision-instruct-maas',
47+
});
48+
3249
export const llama31 = modelRef({
3350
name: 'vertexai/llama-3.1',
3451
info: {
@@ -72,6 +89,7 @@ export const llama3 = modelRef({
7289
export const SUPPORTED_OPENAI_FORMAT_MODELS = {
7390
'llama3-405b': llama3,
7491
'llama-3.1': llama31,
92+
'llama-3.2': llama32,
7593
};
7694

7795
export function modelGardenOpenaiCompatibleModel(
@@ -87,7 +105,6 @@ export function modelGardenOpenaiCompatibleModel(
87105
baseUrlTemplate =
88106
'https://{location}-aiplatform.googleapis.com/v1beta1/projects/{projectId}/locations/{location}/endpoints/openapi';
89107
}
90-
91108
const clientFactory = async (
92109
request: GenerateRequest<typeof ModelGardenModelConfigSchema>
93110
): Promise<OpenAI> => {

0 commit comments

Comments
 (0)