Housekeeping
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -246,7 +246,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.11.11"
|
"version": "3.11.13"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|||||||
@@ -748,7 +748,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.11.12"
|
"version": "3.11.13"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.11.11"
|
"version": "3.11.13"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|||||||
@@ -358,7 +358,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.11.12"
|
"version": "3.11.13"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|||||||
@@ -168,13 +168,13 @@
|
|||||||
"# Put the chunks of data into a Vector Store that associates a Vector Embedding with each chunk\n",
|
"# Put the chunks of data into a Vector Store that associates a Vector Embedding with each chunk\n",
|
||||||
"# Chroma is a popular open source Vector Database based on SQLLite\n",
|
"# Chroma is a popular open source Vector Database based on SQLLite\n",
|
||||||
"\n",
|
"\n",
|
||||||
"embeddings = OpenAIEmbeddings()\n",
|
"# embeddings = OpenAIEmbeddings()\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# If you would rather use the free Vector Embeddings from HuggingFace sentence-transformers\n",
|
"# If you would rather use the free Vector Embeddings from HuggingFace sentence-transformers\n",
|
||||||
"# Then replace embeddings = OpenAIEmbeddings()\n",
|
"# Then replace embeddings = OpenAIEmbeddings()\n",
|
||||||
"# with:\n",
|
"# with:\n",
|
||||||
"# from langchain.embeddings import HuggingFaceEmbeddings\n",
|
"from langchain.embeddings import HuggingFaceEmbeddings\n",
|
||||||
"# embeddings = HuggingFaceEmbeddings(model_name=\"sentence-transformers/all-MiniLM-L6-v2\")\n",
|
"embeddings = HuggingFaceEmbeddings(model_name=\"sentence-transformers/all-MiniLM-L6-v2\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Delete if already exists\n",
|
"# Delete if already exists\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -329,6 +329,23 @@
|
|||||||
"</table>"
|
"</table>"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "3dd0a478-bde4-41f8-8fe8-a35d3246e1b6",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Alternative: to use a free open-source model instead of OpenAI in the next cell\n",
|
||||||
|
"\n",
|
||||||
|
"First run this in a cell: `!pip install langchain-ollama`\n",
|
||||||
|
"\n",
|
||||||
|
"Then replace `llm = ChatOpenAI(temperature=0.7, model_name=MODEL)` with:\n",
|
||||||
|
"\n",
|
||||||
|
"```python\n",
|
||||||
|
"from langchain_ollama import ChatOllama\n",
|
||||||
|
"llm = ChatOllama(temperature=0.7, model=\"llama3.2\")\n",
|
||||||
|
"```"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
|
|||||||
@@ -475,7 +475,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.11.12"
|
"version": "3.11.13"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|||||||
Reference in New Issue
Block a user