Skip to content

Commit

Permalink
Added support for Gemini 1.5 Flash 8B and updated available versions …
Browse files Browse the repository at this point in the history
…for Google AI and Vertex AI Gemini models (#1005)

* Added support for Gemini 1.5 Flash 8B and updated other models

* Reverted default Google AI model to absolute latest

* formatted

* vertex changes

---------

Co-authored-by: “chrisraygill” <“[email protected]”>
  • Loading branch information
chrisraygill and “chrisraygill” authored Oct 4, 2024
1 parent 8f28a89 commit 96ea3e8
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 7 deletions.
37 changes: 33 additions & 4 deletions js/plugins/googleai/src/gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,19 @@ export const geminiPro = modelRef({
name: 'googleai/gemini-pro',
info: {
label: 'Google AI - Gemini Pro',
versions: ['gemini-1.0-pro', 'gemini-1.0-pro-latest', 'gemini-1.0-pro-001'],
supports: {
multiturn: true,
media: false,
tools: true,
systemRole: true,
},
versions: ['gemini-1.0-pro', 'gemini-1.0-pro-latest', 'gemini-1.0-pro-001'],
},
configSchema: GeminiConfigSchema,
});

/**
* @deprecated Use `gemini15Pro` or `gemini15Flash` instead.
* @deprecated Use `gemini15Pro`, `gemini15Flash`, or `gemini15flash8B` instead.
*/
export const geminiProVision = modelRef({
name: 'googleai/gemini-pro-vision',
Expand Down Expand Up @@ -123,7 +123,12 @@ export const gemini15Pro = modelRef({
systemRole: true,
output: ['text', 'json'],
},
versions: ['gemini-1.5-pro-001'],
versions: [
'gemini-1.5-pro',
'gemini-1.5-pro-001',
'gemini-1.5-pro-002',
'gemini-1.5-pro-exp-0827',
],
},
configSchema: GeminiConfigSchema,
});
Expand All @@ -139,7 +144,30 @@ export const gemini15Flash = modelRef({
systemRole: true,
output: ['text', 'json'],
},
versions: ['gemini-1.5-flash-001'],
versions: [
'gemini-1.5-flash',
'gemini-1.5-flash-001',
'gemini-1.5-flash-002',
'gemini-1.5-flash-8b-exp-0924',
'gemini-1.5-flash-8b-exp-0827',
'gemini-1.5-flash-exp-0827',
],
},
configSchema: GeminiConfigSchema,
});

export const gemini15Flash8B = modelRef({
name: 'googleai/gemini-1.5-flash-8b-latest',
info: {
label: 'Google AI - Gemini 1.5 Flash-8B',
supports: {
multiturn: true,
media: true,
tools: true,
systemRole: true,
output: ['text', 'json'],
},
versions: ['gemini-1.5-flash-8b', 'gemini-1.5-flash-8b-001'],
},
configSchema: GeminiConfigSchema,
});
Expand Down Expand Up @@ -174,6 +202,7 @@ export const SUPPORTED_V15_MODELS: Record<
> = {
'gemini-1.5-pro-latest': gemini15Pro,
'gemini-1.5-flash-latest': gemini15Flash,
'gemini-1.5-flash-8b-latest': gemini15Flash8B,
};

const SUPPORTED_MODELS = {
Expand Down
2 changes: 2 additions & 0 deletions js/plugins/googleai/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
} from './embedder.js';
import {
gemini15Flash,
gemini15Flash8B,
gemini15Pro,
geminiPro,
geminiProVision,
Expand All @@ -31,6 +32,7 @@ import {
} from './gemini.js';
export {
gemini15Flash,
gemini15Flash8B,
gemini15Pro,
geminiPro,
geminiProVision,
Expand Down
14 changes: 11 additions & 3 deletions js/plugins/vertexai/src/gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const geminiPro = modelRef({
name: 'vertexai/gemini-1.0-pro',
info: {
label: 'Vertex AI - Gemini Pro',
versions: ['gemini-1.0-pro', 'gemini-1.0-pro-001'],
versions: ['gemini-1.0-pro', 'gemini-1.0-pro-001', 'gemini-1.0-pro-002'],
supports: {
multiturn: true,
media: false,
Expand Down Expand Up @@ -113,7 +113,11 @@ export const gemini15Pro = modelRef({
name: 'vertexai/gemini-1.5-pro',
info: {
label: 'Vertex AI - Gemini 1.5 Pro',
versions: ['gemini-1.5-pro-001'],
versions: [
'gemini-1.5-pro-001',
'gemini-1.5-pro-002',
'gemini-pro-experimental',
],
supports: {
multiturn: true,
media: true,
Expand Down Expand Up @@ -160,7 +164,11 @@ export const gemini15Flash = modelRef({
name: 'vertexai/gemini-1.5-flash',
info: {
label: 'Vertex AI - Gemini 1.5 Flash',
versions: ['gemini-1.5-flash-001'],
versions: [
'gemini-1.5-flash-001',
'gemini-1.5-flash-002',
'gemini-flash-experimental',
],
supports: {
multiturn: true,
media: true,
Expand Down

0 comments on commit 96ea3e8

Please sign in to comment.