Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Gemini 1.5 Flash 8B and updated available versions for Google AI and Vertex AI Gemini models #1005

Merged
merged 4 commits into from
Oct 4, 2024
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
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',
chrisraygill marked this conversation as resolved.
Show resolved Hide resolved
],
},
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
Loading