Skip to content

Commit e455fab

Browse files
authored
docs: Update Multi_modal_RAG_google.ipynb to remove the unsupported Gemini models (#31526)
- **Description:** Remove the outdated Gemini models and replace those with the latest models. - **Issue:** Earlier the code was not running, now the code runs. - **Dependencies:** No - **Twitter handle:** [soumendrak_](https://x.com/soumendrak_)
1 parent b21526f commit e455fab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cookbook/Multi_modal_RAG_google.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
" )\n",
186186
" # Text summary chain\n",
187187
" model = VertexAI(\n",
188-
" temperature=0, model_name=\"gemini-pro\", max_tokens=1024\n",
188+
" temperature=0, model_name=\"gemini-2.0-flash-lite-001\", max_tokens=1024\n",
189189
" ).with_fallbacks([empty_response])\n",
190190
" summarize_chain = {\"element\": lambda x: x} | prompt | model | StrOutputParser()\n",
191191
"\n",
@@ -254,7 +254,7 @@
254254
"\n",
255255
"def image_summarize(img_base64, prompt):\n",
256256
" \"\"\"Make image summary\"\"\"\n",
257-
" model = ChatVertexAI(model=\"gemini-pro-vision\", max_tokens=1024)\n",
257+
" model = ChatVertexAI(model=\"gemini-2.0-flash\", max_tokens=1024)\n",
258258
"\n",
259259
" msg = model.invoke(\n",
260260
" [\n",
@@ -394,7 +394,7 @@
394394
"# The vectorstore to use to index the summaries\n",
395395
"vectorstore = Chroma(\n",
396396
" collection_name=\"mm_rag_cj_blog\",\n",
397-
" embedding_function=VertexAIEmbeddings(model_name=\"textembedding-gecko@latest\"),\n",
397+
" embedding_function=VertexAIEmbeddings(model_name=\"text-embedding-005\"),\n",
398398
")\n",
399399
"\n",
400400
"# Create retriever\n",
@@ -553,7 +553,7 @@
553553
" \"\"\"\n",
554554
"\n",
555555
" # Multi-modal LLM\n",
556-
" model = ChatVertexAI(temperature=0, model_name=\"gemini-pro-vision\", max_tokens=1024)\n",
556+
" model = ChatVertexAI(temperature=0, model_name=\"gemini-2.0-flash\", max_tokens=1024)\n",
557557
"\n",
558558
" # RAG pipeline\n",
559559
" chain = (\n",

0 commit comments

Comments
 (0)