Skip to content

Commit 7823bc3

Browse files
authored
Remove deprecated Gemini models (#261)
* Remove deprecated models * More fixes
1 parent ed1892f commit 7823bc3

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

integrations/google-ai.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ toc: true
2222
- [Overview](#overview)
2323
- [Installation](#installation)
2424
- [Usage](#usage)
25-
- [Multimodality with `gemini-pro-vision`](#multimodality-with-gemini-pro-vision)
25+
- [Multimodality with `gemini-1.5-flash`](#multimodality-with-gemini-1.5-flash)
2626
- [Function calling](#function-calling)
2727
- [Code generation](#code-generation)
2828

@@ -44,8 +44,8 @@ pip install google-ai-haystack
4444

4545
Once installed, you will have access to various Haystack Generators:
4646

47-
- [`GoogleAIGeminiGenerator`](https://docs.haystack.deepset.ai/docs/googleaigeminigenerator): Use this component with Gemini models '**gemini-pro**', '**gemini-pro-vision**', '**gemini-ultra**' for text generation and multimodal prompts.
48-
- [`GoogleAIGeminiChatGenerator`](https://docs.haystack.deepset.ai/docs/googleaigeminichatgenerator): Use this component with Gemini models '**gemini-pro**', '**gemini-pro-vision**' and '**gemini-ultra**' for text generation, multimodal prompts and function calling in chat completion setting.
47+
- [`GoogleAIGeminiGenerator`](https://docs.haystack.deepset.ai/docs/googleaigeminigenerator): Use this component with Gemini models '**gemini-pro**', '**gemini-1.5-flash**', '**gemini-1.5-pro**' for text generation and multimodal prompts.
48+
- [`GoogleAIGeminiChatGenerator`](https://docs.haystack.deepset.ai/docs/googleaigeminichatgenerator): Use this component with Gemini models '**gemini-pro**', '**gemini-1.5-flash**' and '**gemini-1.5-pro**' for text generation, multimodal prompts and function calling in chat completion setting.
4949

5050
To use Google Gemini models you need an API key. You can either pass it as init argument or set a `GOOGLE_API_KEY` environment variable. If neither is set you won't be able to use the generators.
5151

@@ -72,9 +72,9 @@ Output:
7272
Assemblage in art refers to the creation of a three-dimensional artwork by combining various found objects...
7373
```
7474

75-
### Multimodality with `gemini-pro-vision`
75+
### Multimodality with `gemini-1.5-flash`
7676

77-
To use `gemini-pro-vision` model for visual question answering, initialize a `GoogleAIGeminiGenerator` with `"gemini-pro-vision"` and `project_id`. Then, run it with the images as well as the prompt:
77+
To use `gemini-1.5-flash` model for visual question answering, initialize a `GoogleAIGeminiGenerator` with `"gemini-1.5-flash"` and `project_id`. Then, run it with the images as well as the prompt:
7878

7979
```python
8080
import requests
@@ -101,7 +101,7 @@ images = [
101101

102102
os.environ["GOOGLE_API_KEY"] = "YOUR-GOOGLE-API-KEY"
103103

104-
gemini_generator = GoogleAIGeminiGenerator(model="gemini-pro-vision")
104+
gemini_generator = GoogleAIGeminiGenerator(model="gemini-1.5-flash")
105105
result = gemini_generator.run(parts = ["What can you tell me about these robots?", *images])
106106
for answer in result["replies"]:
107107
print(answer)

integrations/google-vertex-ai.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ pip install google-vertex-haystack
4747
## Usage
4848

4949
Once installed, you will have access to various Haystack Generators:
50-
- [`VertexAIGeminiGenerator`](https://docs.haystack.deepset.ai/docs/vertexaigeminigenerator): Use this component with Gemini models '**gemini-pro**' and '**gemini-pro-vision**' for text generation and multimodal prompts.
51-
- [`VertexAIGeminiChatGenerator`](https://docs.haystack.deepset.ai/docs/vertexaigeminichatgenerator): Use this component with Gemini models '**gemini-pro**' and '**gemini-pro-vision**' for text generation, multimodal prompts and function calling in chat completion setting.
50+
- [`VertexAIGeminiGenerator`](https://docs.haystack.deepset.ai/docs/vertexaigeminigenerator): Use this component with Gemini models '**gemini-pro**' and '**gemini-1.5-flash**' for text generation and multimodal prompts.
51+
- [`VertexAIGeminiChatGenerator`](https://docs.haystack.deepset.ai/docs/vertexaigeminichatgenerator): Use this component with Gemini models '**gemini-pro**' and '**gemini-1.5-flash**' for text generation, multimodal prompts and function calling in chat completion setting.
5252
- `VertexAITextGenerator`: Use this component with PaLM models for text generation.
5353
- `VertexAICodeGenerator`: Use this component with Codey model for code generation and code completion.
5454
- `VertexAIImageGenerator`: Use this component with Imagen model '**imagegeneration**' for image generation.
@@ -80,9 +80,9 @@ Output:
8080
Assemblage in art refers to the creation of a three-dimensional artwork by combining various found objects...
8181
```
8282

83-
**Multimodality with `gemini-pro-vision`**
83+
**Multimodality with `gemini-1.5-flash`**
8484

85-
To use `gemini-pro-vision` model for visual question answering, initialize a `VertexAIGeminiGenerator` with `"gemini-pro-vision"` and `project_id`. Then, run it with the images as well as the prompt:
85+
To use `gemini-1.5-flash` model for visual question answering, initialize a `VertexAIGeminiGenerator` with `"gemini-1.5-flash"` and `project_id`. Then, run it with the images as well as the prompt:
8686

8787
```python
8888
import requests
@@ -99,7 +99,7 @@ images = [
9999
ByteStream(data=requests.get(url).content, mime_type="image/jpeg")
100100
for url in URLS
101101
]
102-
gemini_generator = VertexAIGeminiGenerator(model="gemini-pro-vision", project_id=project_id)
102+
gemini_generator = VertexAIGeminiGenerator(model="gemini-1.5-flash", project_id=project_id)
103103
result = gemini_generator.run(parts = ["What can you tell me about these robots?", *images])
104104
for answer in result["replies"]:
105105
print(answer)

0 commit comments

Comments
 (0)