Skip to content

Commit a26358f

Browse files
committed
changes required to make the example work
Signed-off-by: Jack Woehr <[email protected]>
1 parent d24bc10 commit a26358f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

generative-ai/langchain-rag.ipynb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"from ibm_watsonx_ai.foundation_models.utils.enums import EmbeddingTypes\n",
108108
"\n",
109109
"from langchain_ibm import WatsonxEmbeddings, WatsonxLLM\n",
110-
"from langchain.vectorstores import Chroma\n",
110+
"from langchain_chroma import Chroma\n",
111111
"\n",
112112
"from langchain_core.prompts import ChatPromptTemplate\n",
113113
"from langchain_core.output_parsers import StrOutputParser\n",
@@ -284,27 +284,27 @@
284284
"\n"
285285
]
286286
},
287+
{
288+
"cell_type": "markdown",
289+
"metadata": {},
290+
"source": [
291+
"Let's load our content into a local instance of a vector database, using Chroma."
292+
]
293+
},
287294
{
288295
"cell_type": "code",
289296
"execution_count": null,
290297
"metadata": {},
291298
"outputs": [],
292299
"source": [
293300
"embeddings = WatsonxEmbeddings(\n",
294-
" model_id=EmbeddingTypes.IBM_SLATE_30M_ENG.value,\n",
301+
" model_id=\"ibm/slate-30m-english-rtrvr-v2\",\n",
295302
" url=credentials[\"url\"],# type: ignore\n",
296303
" apikey=credentials[\"apikey\"],# type: ignore\n",
297304
" project_id=project_id,\n",
298305
" )"
299306
]
300307
},
301-
{
302-
"cell_type": "markdown",
303-
"metadata": {},
304-
"source": [
305-
"Let's load our content into a local instance of a vector database, using Chroma."
306-
]
307-
},
308308
{
309309
"cell_type": "code",
310310
"execution_count": null,
@@ -349,7 +349,7 @@
349349
"metadata": {},
350350
"outputs": [],
351351
"source": [
352-
"model_id = \"ibm/granite-3-8b-instruct\""
352+
"model_id = \"ibm/granite-3-3-8b-instruct\""
353353
]
354354
},
355355
{
@@ -538,7 +538,7 @@
538538
],
539539
"metadata": {
540540
"kernelspec": {
541-
"display_name": "base",
541+
"display_name": "Python 3 (ipykernel)",
542542
"language": "python",
543543
"name": "python3"
544544
},
@@ -552,7 +552,7 @@
552552
"name": "python",
553553
"nbconvert_exporter": "python",
554554
"pygments_lexer": "ipython3",
555-
"version": "3.12.4"
555+
"version": "3.12.3"
556556
}
557557
},
558558
"nbformat": 4,

0 commit comments

Comments
 (0)