Skip to content

Commit e624199

Browse files
Merge pull request #70 from FormulaMonks/chore/update-gemini-supported-models
Chore/update gemini supported models
2 parents 1979e0d + e133a1e commit e624199

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

examples/basic/src/vertex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const vertexAdapter = new KurtVertexAI({
88
project: process.env.VERTEX_AI_PROJECT ?? "my-project",
99
location: process.env.VERTEX_AI_LOCATION ?? "us-central1",
1010
}),
11-
model: "gemini-1.0-pro", // or any other supported model
11+
model: "gemini-1.5-pro", // or any other supported model
1212
})
1313

1414
const kurt = new Kurt(vertexAdapter)

packages/kurt-vertex-ai/spec/isSupportedModel.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import { expect, test } from "@jest/globals"
2-
import {
3-
KurtVertexAI,
4-
type KurtVertexAISupportedModel,
5-
} from "../src/KurtVertexAI"
2+
import { KurtVertexAI, type KurtVertexAISupportedModel } from "../src"
63

74
test("KurtVertexAI.isSupportedModel", () => {
85
// For updating this test, the current list of models can be found at:
9-
// https://platform.openai.com/docs/models/overview
6+
// https://ai.google.dev/gemini-api/docs/models/gemini
107
expect(KurtVertexAI.isSupportedModel("gemini-1.5-pro")).toBe(true)
11-
expect(KurtVertexAI.isSupportedModel("gemini-1.0-pro")).toBe(true)
8+
expect(KurtVertexAI.isSupportedModel("gemini-1.5-flash")).toBe(true)
9+
expect(KurtVertexAI.isSupportedModel("gemini-1.5-flash-8b")).toBe(true)
10+
expect(KurtVertexAI.isSupportedModel("gemini-2.0-flash")).toBe(true)
11+
expect(KurtVertexAI.isSupportedModel("gemini-1.0-pro")).toBe(false)
1212
expect(KurtVertexAI.isSupportedModel("gemini-1.0-pro-vision")).toBe(false)
1313

1414
expect(KurtVertexAI.isSupportedModel("bogus")).toBe(false)
1515

1616
// The below code proves that the function works as a type guard.
17-
const modelName = "gemini-1.0-pro"
17+
const modelName = "gemini-1.5-pro"
1818
if (KurtVertexAI.isSupportedModel(modelName)) {
1919
const modelNameGood: KurtVertexAISupportedModel = modelName
2020
}

packages/kurt-vertex-ai/src/KurtVertexAI.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ import type {
3434
import { ZodError } from "zod"
3535

3636
// These models support function calling.
37-
const COMPATIBLE_MODELS = ["gemini-1.0-pro", "gemini-1.5-pro"] as const
37+
const COMPATIBLE_MODELS = [
38+
"gemini-1.5-pro",
39+
"gemini-1.5-flash",
40+
"gemini-1.5-flash-8b",
41+
"gemini-2.0-flash",
42+
] as const
3843

3944
export type KurtVertexAISupportedModel = (typeof COMPATIBLE_MODELS)[number]
4045

0 commit comments

Comments
 (0)