Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions course-multi-vector-search/module-0/installing-dependencies.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
"cells": [
{
"metadata": {},
"cell_type": "markdown",
"source": "# Module 0: Installing Dependencies",
"id": "9af5bc4b49d17ebc"
},
{
"cell_type": "markdown",
"id": "mli6s9xkllr",
"source": "We need `qdrant-client` for interacting with Qdrant and `fastembed` for generating vector embeddings locally.",
"metadata": {}
},
{
"metadata": {
"jupyter": {
"is_executing": true
}
},
"cell_type": "code",
"outputs": [],
"execution_count": 1,
"source": "!pip install -q \"qdrant-client==1.16.2\" \"fastembed==0.7.4\"",
"id": "466eb04e8e447feb"
},
{
"cell_type": "markdown",
"id": "6u2wb574s8n",
"source": "Let's verify that both packages were installed correctly by importing them.",
"metadata": {}
},
{
"cell_type": "code",
"execution_count": 2,
"id": "8e66867cd6ebf200",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"All dependencies installed successfully!\n"
]
}
],
"source": [
"from qdrant_client import QdrantClient\n",
"from fastembed import TextEmbedding\n",
"\n",
"print(\"All dependencies installed successfully!\")"
]
},
{
"cell_type": "markdown",
"id": "uvxeas5v8er",
"source": "Connect to your Qdrant instance. Replace the URL and API key with your own Qdrant Cloud credentials, or use a local instance.",
"metadata": {}
},
{
"cell_type": "code",
"execution_count": 3,
"id": "1ea6882564a624f5",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Connected to Qdrant: collections=[]\n"
]
}
],
"source": [
"# For Qdrant Cloud\n",
"client = QdrantClient(\n",
" url=\"https://your-cluster-url.cloud.qdrant.io\",\n",
" api_key=\"your-api-key\"\n",
")\n",
"\n",
"# For local Qdrant\n",
"# client = QdrantClient(url=\"http://localhost:6333\")\n",
"\n",
"print(f\"Connected to Qdrant: {client.get_collections()}\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a9bdeae2-ae97-4110-92f4-531168f3b31c",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading