Skip to content

Commit

Permalink
docs: Add Gemini 1.5 Flash to models list (#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmigloz committed May 14, 2024
1 parent 8d0786b commit 40f4c9d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Mind that this list may not be up-to-date. Refer to the [documentation](https://
```dart
final chatModel = ChatFirebaseVertexAI(
defaultOptions: ChatFirebaseVertexAIOptions(
model: 'gemini-1.5-pro-preview-0409',
model: 'gemini-1.5-pro-preview-0514',
),
);
final res = await chatModel.invoke(
Expand Down Expand Up @@ -122,7 +122,7 @@ final promptTemplate = ChatPromptTemplate.fromTemplates(const [
final chatModel = ChatFirebaseVertexAI(
defaultOptions: ChatFirebaseVertexAIOptions(
model: 'gemini-1.5-pro-preview-0409',
model: 'gemini-1.5-pro-preview-0514',
),
);
Expand Down Expand Up @@ -160,7 +160,7 @@ const tool = ToolSpec(
);
final chatModel = ChatFirebaseVertexAI(
defaultOptions: ChatFirebaseVertexAIOptions(
model: 'gemini-1.5-pro-preview-0409',
model: 'gemini-1.5-pro-preview-0514',
temperature: 0,
tools: [tool],
),
Expand Down
22 changes: 13 additions & 9 deletions docs/modules/model_io/models/chat_models/integrations/googleai.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,21 @@ To use `ChatGoogleGenerativeAI` you need to have an API key. You can get one [he

The following models are available:
- `gemini-1.0-pro` (or `gemini-pro`):
* text -> text model
* Max input token: 30720
* Max output tokens: 2048
* text -> text model
* Max input token: 30720
* Max output tokens: 2048
- `gemini-pro-vision`:
* text / image -> text model
* Max input token: 12288
* Max output tokens: 4096
* text / image -> text model
* Max input token: 12288
* Max output tokens: 4096
- `gemini-1.5-pro-latest`: text / image -> text model
* text / image -> text model
* Max input token: 1048576
* Max output tokens: 8192
* text / image / audio -> text model
* Max input token: 1048576
* Max output tokens: 8192
- `gemini-1.5-flash-latest`:
* text / image / audio -> text model
* Max input token: 1048576
* Max output tokens: 8192

Mind that this list may not be up-to-date. Refer to the [documentation](https://ai.google.dev/models) for the updated list.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ import 'types.dart';
/// );
/// final chatModel = ChatFirebaseVertexAI(
/// defaultOptions: ChatFirebaseVertexAIOptions(
/// model: 'gemini-1.5-pro-preview-0409',
/// model: 'gemini-1.5-pro-preview-0514',
/// temperature: 0,
/// tools: [tool],
/// ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ import 'types.dart';
/// * Max input token: 12288
/// * Max output tokens: 4096
/// - `gemini-1.5-pro-latest`: text / image -> text model
/// * text / image -> text model
/// * text / image / audio -> text model
/// * Max input token: 1048576
/// * Max output tokens: 8192
/// - `gemini-1.5-flash-latest`:
/// * text / image / audio -> text model
/// * Max input token: 1048576
/// * Max output tokens: 8192
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ void main() {
});

test('Test Text-only input with gemini-pro', () async {
const models = ['gemini-1.0-pro', 'gemini-1.5-pro-latest'];
const models = [
'gemini-1.0-pro',
'gemini-1.5-pro-latest',
'gemini-1.5-flash-latest',
];
for (final model in models) {
final res = await chatModel.invoke(
PromptValue.string(
Expand Down

0 comments on commit 40f4c9d

Please sign in to comment.