|
185 | 185 | " )\n",
|
186 | 186 | " # Text summary chain\n",
|
187 | 187 | " 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", |
189 | 189 | " ).with_fallbacks([empty_response])\n",
|
190 | 190 | " summarize_chain = {\"element\": lambda x: x} | prompt | model | StrOutputParser()\n",
|
191 | 191 | "\n",
|
|
254 | 254 | "\n",
|
255 | 255 | "def image_summarize(img_base64, prompt):\n",
|
256 | 256 | " \"\"\"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", |
258 | 258 | "\n",
|
259 | 259 | " msg = model.invoke(\n",
|
260 | 260 | " [\n",
|
|
394 | 394 | "# The vectorstore to use to index the summaries\n",
|
395 | 395 | "vectorstore = Chroma(\n",
|
396 | 396 | " 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", |
398 | 398 | ")\n",
|
399 | 399 | "\n",
|
400 | 400 | "# Create retriever\n",
|
|
553 | 553 | " \"\"\"\n",
|
554 | 554 | "\n",
|
555 | 555 | " # 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", |
557 | 557 | "\n",
|
558 | 558 | " # RAG pipeline\n",
|
559 | 559 | " chain = (\n",
|
|
0 commit comments