From d9c70fb40e1ee6e13c82962340141240c480f71c Mon Sep 17 00:00:00 2001 From: SHIVAM <93383164+ShivamGoyal03@users.noreply.github.com> Date: Wed, 19 Feb 2025 17:07:46 +0530 Subject: [PATCH] SQLite Fix added --- 05-agentic-rag/code_samples/05-autogen.ipynb | 291 ++++++++----------- 1 file changed, 128 insertions(+), 163 deletions(-) diff --git a/05-agentic-rag/code_samples/05-autogen.ipynb b/05-agentic-rag/code_samples/05-autogen.ipynb index fca3c7cb..804f2185 100644 --- a/05-agentic-rag/code_samples/05-autogen.ipynb +++ b/05-agentic-rag/code_samples/05-autogen.ipynb @@ -11,121 +11,43 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: chromadb in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (0.6.3)\n", - "Requirement already satisfied: build>=1.0.3 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (1.2.2.post1)\n", - "Requirement already satisfied: pydantic>=1.9 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (2.10.6)\n", - "Requirement already satisfied: chroma-hnswlib==0.7.6 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (0.7.6)\n", - "Requirement already satisfied: fastapi>=0.95.2 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (0.115.8)\n", - "Requirement already satisfied: uvicorn>=0.18.3 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from uvicorn[standard]>=0.18.3->chromadb) (0.34.0)\n", - "Requirement already satisfied: numpy>=1.22.5 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (2.2.3)\n", - "Requirement already satisfied: posthog>=2.4.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (3.14.1)\n", - "Requirement already satisfied: typing_extensions>=4.5.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (4.12.2)\n", - "Requirement already satisfied: onnxruntime>=1.14.1 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (1.20.1)\n", - "Requirement already satisfied: opentelemetry-api>=1.2.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (1.30.0)\n", - "Requirement already satisfied: opentelemetry-exporter-otlp-proto-grpc>=1.2.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (1.30.0)\n", - "Requirement already satisfied: opentelemetry-instrumentation-fastapi>=0.41b0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (0.51b0)\n", - "Requirement already satisfied: opentelemetry-sdk>=1.2.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (1.30.0)\n", - "Requirement already satisfied: tokenizers>=0.13.2 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (0.21.0)\n", - "Requirement already satisfied: pypika>=0.48.9 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (0.48.9)\n", - "Requirement already satisfied: tqdm>=4.65.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (4.67.1)\n", - "Requirement already satisfied: overrides>=7.3.1 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (7.7.0)\n", - "Requirement already satisfied: importlib-resources in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (6.5.2)\n", - "Requirement already satisfied: grpcio>=1.58.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (1.70.0)\n", - "Requirement already satisfied: bcrypt>=4.0.1 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (4.2.1)\n", - "Requirement already satisfied: typer>=0.9.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (0.15.1)\n", - "Requirement already satisfied: kubernetes>=28.1.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (32.0.0)\n", - "Requirement already satisfied: tenacity>=8.2.3 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (9.0.0)\n", - "Requirement already satisfied: PyYAML>=6.0.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (6.0.2)\n", - "Requirement already satisfied: mmh3>=4.0.1 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (5.1.0)\n", - "Requirement already satisfied: orjson>=3.9.12 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (3.10.15)\n", - "Requirement already satisfied: httpx>=0.27.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (0.28.1)\n", - "Requirement already satisfied: rich>=10.11.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from chromadb) (13.9.4)\n", - "Requirement already satisfied: packaging>=19.1 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from build>=1.0.3->chromadb) (24.2)\n", - "Requirement already satisfied: pyproject_hooks in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from build>=1.0.3->chromadb) (1.2.0)\n", - "Requirement already satisfied: colorama in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from build>=1.0.3->chromadb) (0.4.6)\n", - "Requirement already satisfied: starlette<0.46.0,>=0.40.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from fastapi>=0.95.2->chromadb) (0.45.3)\n", - "Requirement already satisfied: anyio in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from httpx>=0.27.0->chromadb) (4.8.0)\n", - "Requirement already satisfied: certifi in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from httpx>=0.27.0->chromadb) (2025.1.31)\n", - "Requirement already satisfied: httpcore==1.* in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from httpx>=0.27.0->chromadb) (1.0.7)\n", - "Requirement already satisfied: idna in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from httpx>=0.27.0->chromadb) (3.10)\n", - "Requirement already satisfied: h11<0.15,>=0.13 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from httpcore==1.*->httpx>=0.27.0->chromadb) (0.14.0)\n", - "Requirement already satisfied: six>=1.9.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from kubernetes>=28.1.0->chromadb) (1.17.0)\n", - "Requirement already satisfied: python-dateutil>=2.5.3 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from kubernetes>=28.1.0->chromadb) (2.9.0.post0)\n", - "Requirement already satisfied: google-auth>=1.0.1 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from kubernetes>=28.1.0->chromadb) (2.38.0)\n", - "Requirement already satisfied: websocket-client!=0.40.0,!=0.41.*,!=0.42.*,>=0.32.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from kubernetes>=28.1.0->chromadb) (1.8.0)\n", - "Requirement already satisfied: requests in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from kubernetes>=28.1.0->chromadb) (2.32.3)\n", - "Requirement already satisfied: requests-oauthlib in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from kubernetes>=28.1.0->chromadb) (2.0.0)\n", - "Requirement already satisfied: oauthlib>=3.2.2 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from kubernetes>=28.1.0->chromadb) (3.2.2)\n", - "Requirement already satisfied: urllib3>=1.24.2 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from kubernetes>=28.1.0->chromadb) (2.3.0)\n", - "Requirement already satisfied: durationpy>=0.7 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from kubernetes>=28.1.0->chromadb) (0.9)\n", - "Requirement already satisfied: coloredlogs in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from onnxruntime>=1.14.1->chromadb) (15.0.1)\n", - "Requirement already satisfied: flatbuffers in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from onnxruntime>=1.14.1->chromadb) (25.2.10)\n", - "Requirement already satisfied: protobuf in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from onnxruntime>=1.14.1->chromadb) (5.29.3)\n", - "Requirement already satisfied: sympy in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from onnxruntime>=1.14.1->chromadb) (1.13.3)\n", - "Requirement already satisfied: deprecated>=1.2.6 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from opentelemetry-api>=1.2.0->chromadb) (1.2.18)\n", - "Requirement already satisfied: importlib-metadata<=8.5.0,>=6.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from opentelemetry-api>=1.2.0->chromadb) (8.5.0)\n", - "Requirement already satisfied: googleapis-common-protos~=1.52 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from opentelemetry-exporter-otlp-proto-grpc>=1.2.0->chromadb) (1.67.0)\n", - "Requirement already satisfied: opentelemetry-exporter-otlp-proto-common==1.30.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from opentelemetry-exporter-otlp-proto-grpc>=1.2.0->chromadb) (1.30.0)\n", - "Requirement already satisfied: opentelemetry-proto==1.30.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from opentelemetry-exporter-otlp-proto-grpc>=1.2.0->chromadb) (1.30.0)\n", - "Requirement already satisfied: opentelemetry-instrumentation-asgi==0.51b0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from opentelemetry-instrumentation-fastapi>=0.41b0->chromadb) (0.51b0)\n", - "Requirement already satisfied: opentelemetry-instrumentation==0.51b0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from opentelemetry-instrumentation-fastapi>=0.41b0->chromadb) (0.51b0)\n", - "Requirement already satisfied: opentelemetry-semantic-conventions==0.51b0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from opentelemetry-instrumentation-fastapi>=0.41b0->chromadb) (0.51b0)\n", - "Requirement already satisfied: opentelemetry-util-http==0.51b0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from opentelemetry-instrumentation-fastapi>=0.41b0->chromadb) (0.51b0)\n", - "Requirement already satisfied: wrapt<2.0.0,>=1.0.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from opentelemetry-instrumentation==0.51b0->opentelemetry-instrumentation-fastapi>=0.41b0->chromadb) (1.17.2)\n", - "Requirement already satisfied: asgiref~=3.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from opentelemetry-instrumentation-asgi==0.51b0->opentelemetry-instrumentation-fastapi>=0.41b0->chromadb) (3.8.1)\n", - "Requirement already satisfied: monotonic>=1.5 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from posthog>=2.4.0->chromadb) (1.6)\n", - "Requirement already satisfied: backoff>=1.10.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from posthog>=2.4.0->chromadb) (2.2.1)\n", - "Requirement already satisfied: annotated-types>=0.6.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from pydantic>=1.9->chromadb) (0.7.0)\n", - "Requirement already satisfied: pydantic-core==2.27.2 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from pydantic>=1.9->chromadb) (2.27.2)\n", - "Requirement already satisfied: markdown-it-py>=2.2.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from rich>=10.11.0->chromadb) (3.0.0)\n", - "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from rich>=10.11.0->chromadb) (2.19.1)\n", - "Requirement already satisfied: huggingface-hub<1.0,>=0.16.4 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from tokenizers>=0.13.2->chromadb) (0.28.1)\n", - "Requirement already satisfied: click>=8.0.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from typer>=0.9.0->chromadb) (8.1.8)\n", - "Requirement already satisfied: shellingham>=1.3.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from typer>=0.9.0->chromadb) (1.5.4)\n", - "Requirement already satisfied: httptools>=0.6.3 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from uvicorn[standard]>=0.18.3->chromadb) (0.6.4)\n", - "Requirement already satisfied: python-dotenv>=0.13 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from uvicorn[standard]>=0.18.3->chromadb) (1.0.1)\n", - "Requirement already satisfied: watchfiles>=0.13 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from uvicorn[standard]>=0.18.3->chromadb) (1.0.4)\n", - "Requirement already satisfied: websockets>=10.4 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from uvicorn[standard]>=0.18.3->chromadb) (15.0)\n", - "Requirement already satisfied: cachetools<6.0,>=2.0.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from google-auth>=1.0.1->kubernetes>=28.1.0->chromadb) (5.5.1)\n", - "Requirement already satisfied: pyasn1-modules>=0.2.1 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from google-auth>=1.0.1->kubernetes>=28.1.0->chromadb) (0.4.1)\n", - "Requirement already satisfied: rsa<5,>=3.1.4 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from google-auth>=1.0.1->kubernetes>=28.1.0->chromadb) (4.9)\n", - "Requirement already satisfied: filelock in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from huggingface-hub<1.0,>=0.16.4->tokenizers>=0.13.2->chromadb) (3.17.0)\n", - "Requirement already satisfied: fsspec>=2023.5.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from huggingface-hub<1.0,>=0.16.4->tokenizers>=0.13.2->chromadb) (2025.2.0)\n", - "Requirement already satisfied: zipp>=3.20 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from importlib-metadata<=8.5.0,>=6.0->opentelemetry-api>=1.2.0->chromadb) (3.21.0)\n", - "Requirement already satisfied: mdurl~=0.1 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->chromadb) (0.1.2)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from requests->kubernetes>=28.1.0->chromadb) (3.4.1)\n", - "Requirement already satisfied: sniffio>=1.1 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from anyio->httpx>=0.27.0->chromadb) (1.3.1)\n", - "Requirement already satisfied: humanfriendly>=9.1 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from coloredlogs->onnxruntime>=1.14.1->chromadb) (10.0)\n", - "Requirement already satisfied: mpmath<1.4,>=1.1.0 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from sympy->onnxruntime>=1.14.1->chromadb) (1.3.0)\n", - "Requirement already satisfied: pyreadline3 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from humanfriendly>=9.1->coloredlogs->onnxruntime>=1.14.1->chromadb) (3.5.4)\n", - "Requirement already satisfied: pyasn1<0.7.0,>=0.4.6 in e:\\coding material\\python pr\\mlsa blog\\github\\ai-agents-for-beginners\\venv\\lib\\site-packages (from pyasn1-modules>=0.2.1->google-auth>=1.0.1->kubernetes>=28.1.0->chromadb) (0.6.1)\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\n", - "[notice] A new release of pip is available: 24.0 -> 25.0.1\n", - "[notice] To update, run: python.exe -m pip install --upgrade pip\n" - ] - } - ], + "outputs": [], "source": [ "# Make sure to run this cell before running the rest of the notebook\n", - "!pip install chromadb" + "%pip install chromadb" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "SQLite Version Fix\n", + "If you encounter the error:\n", + "```\n", + "RuntimeError: Your system has an unsupported version of sqlite3. Chroma requires sqlite3 >= 3.35.0\n", + "```\n", + "\n", + "Uncomment this code block at the start of your notebook:" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [], + "source": [ + "# %pip install pysqlite3-binary\n", + "# import pyqlite3\n", + "# __import__('pysqlite3')\n", + "# import sys\n", + "# sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -153,7 +75,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -191,7 +113,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ @@ -213,9 +135,26 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 21, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Insert of existing embedding ID: doc_0\n", + "Insert of existing embedding ID: doc_1\n", + "Insert of existing embedding ID: doc_2\n", + "Insert of existing embedding ID: doc_3\n", + "Insert of existing embedding ID: doc_4\n", + "Add of existing embedding ID: doc_0\n", + "Add of existing embedding ID: doc_1\n", + "Add of existing embedding ID: doc_2\n", + "Add of existing embedding ID: doc_3\n", + "Add of existing embedding ID: doc_4\n" + ] + } + ], "source": [ "# Initialize ChromaDB with persistent storage\n", "chroma_client = chromadb.PersistentClient(path=\"./chroma_db\")\n", @@ -253,7 +192,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 22, "metadata": {}, "outputs": [], "source": [ @@ -284,7 +223,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ @@ -328,7 +267,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ @@ -368,7 +307,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 25, "metadata": {}, "outputs": [], "source": [ @@ -382,7 +321,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ @@ -405,7 +344,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 27, "metadata": {}, "outputs": [ { @@ -414,81 +353,107 @@ "text": [ "\n", "Processing Query: What luxury vacation packages does Contoso Travel offer?\n", - "Response: As of my last knowledge update in October 2023, Contoso Travel is a fictional company often used as a placeholder in various business scenarios, particularly in Microsoft documentation and examples. Because it doesn't exist in reality, there are no actual luxury vacation packages offered by Contoso Travel.\n", + "Response: Contoso Travel, which typically represents a fictional or illustrative example in training materials, often provides a range of luxury vacation packages that cater to various tastes and preferences. While I don't have access to specific current offerings from a real company named Contoso Travel, I can outline some common features and types of luxury vacation packages that similar travel agencies might provide.\n", + "\n", + "1. **All-Inclusive Resorts**: Packages that include accommodations, meals, drinks, and activities at high-end resorts. Popular destinations might include the Caribbean, Maldives, and Tahiti.\n", "\n", - "However, if we consider a real travel company, typical luxury vacation packages might include:\n", + "2. **Private Yacht Charters**: Luxury vacation packages that offer private yacht rentals, including crewed charters that can explore exotic locales while providing personalized services.\n", "\n", - "1. **Luxury Cruises:** All-inclusive packages featuring gourmet dining, spacious suites, and excursions to exotic destinations.\n", - " \n", - "2. **Private Villas or Estates:** Exclusive stays at luxurious properties, often with personal chefs and concierge service.\n", + "3. **Luxury Safari Packages**: These often include stays in exclusive lodges or private villas in picturesque locations like Africa, complete with guided wildlife tours and cultural experiences.\n", "\n", - "3. **Custom Itineraries:** Tailored travel experiences that include private tours, fine dining, and unique cultural experiences, such as a guided trip through Italy or a safari in Africa.\n", + "4. **Culinary or Wine Tours**: Gourmet experiences that might include private chef dinners, wine tastings in renowned vineyards, or cooking classes with local chefs in destinations famous for their cuisine.\n", "\n", - "4. **Wellness Retreats:** Packages focused on relaxation and self-care, offering spa treatments, yoga sessions, and wellness consultations in beautiful settings.\n", + "5. **Wellness Retreats**: Packages centered around relaxation and rejuvenation, including luxury spa treatments, wellness workshops, and yoga sessions in tranquil settings.\n", "\n", - "5. **Adventure Travel:** High-end adventure experiences like guided treks in the Himalayas or luxury camping (glamping) in national parks.\n", + "6. **Adventure Trips**: Tailored trips that offer high-end experiences combining luxury accommodations with adventurous activities, such as guided trekking in the Himalayas or heli-skiing in Alaska.\n", "\n", - "To find specific luxury vacation packages, it would be best to visit the website of a real travel agency that specializes in luxury travel, where you can browse their current offerings and promotions.\n", + "7. **Cultural Escapades**: Exclusive tours tailored to explore the rich history and culture of regions, often including private tours of museums and historical sites, along with accommodations in luxury hotels.\n", + "\n", + "8. **Honeymoon Packages**: Romantic getaways specifically designed for newlyweds, featuring beachfront bungalows, candlelit dinners, and couples' spa treatments.\n", + "\n", + "When exploring luxury vacation packages with a specific agency, it's advisable to directly visit their website or contact their customer service to examine current offerings, pricing, and customization options according to individual preferences.\n", "\n", "Processing Query: Can you explain Contoso's travel insurance coverage?\n", - "Response: As mentioned earlier, Contoso Travel is a fictional entity primarily used for illustrative purposes in business and tech examples, particularly by Microsoft. Therefore, it does not offer actual products or services, including travel insurance. This means that there isn't specific information about Contoso's travel insurance coverage available; it exists only in hypothetical contexts.\n", + "Response: Since Contoso is often used as a fictional example in training materials, specific details about Contoso's travel insurance coverage are not available. However, I can provide an overview of what you might typically expect from travel insurance coverage offered by a company like Contoso Travel.\n", + "\n", + "### Typical Travel Insurance Coverage Components\n", "\n", - "However, if we were to describe what typical travel insurance coverage might look like for a real travel company, it would generally include several key components:\n", + "1. **Trip Cancellation/Interruption Insurance**: \n", + " - This coverage provides reimbursement for non-refundable travel expenses if a trip must be canceled or interrupted due to covered reasons, such as illness, injury, a family emergency, or natural disasters.\n", "\n", - "1. **Trip Cancellation/Interruption Insurance:** This coverage reimburses travelers for non-refundable costs if they have to cancel or interrupt their trip due to covered reasons such as illness, death in the family, or natural disasters.\n", + "2. **Medical Coverage**:\n", + " - This includes expenses for medical treatment if you become ill or injured while traveling. It may also cover emergency medical transportation and evacuation, especially important for international trips.\n", "\n", - "2. **Medical Expenses Coverage:** This includes coverage for medical emergencies that may occur while traveling, including hospital stays, surgeries, and other necessary medical services.\n", + "3. **Baggage Coverage**: \n", + " - This component covers lost, stolen, or damaged luggage and personal belongings. It may reimburse you for the replacement value of lost items or for the costs incurred to purchase essentials if your luggage is delayed.\n", "\n", - "3. **Emergency Evacuation Coverage:** This provides transportation to the nearest medical facility if a traveler encounters a medical emergency and needs urgent care.\n", + "4. **Flight Delay/Cancellation Coverage**:\n", + " - This reimbursement is for expenses incurred due to delays or cancellations of flights, such as accommodations, meals, and transportation.\n", "\n", - "4. **Baggage Loss/Delay Coverage:** This protects against the loss, theft, or damage of luggage and personal belongings during travel. It may also provide compensation for essential items if baggage is delayed.\n", + "5. **24/7 Assistance Services**:\n", + " - Many travel insurance policies offer emergency assistance hotlines that can help with medical appointments, legal referrals, and other urgent needs while traveling.\n", "\n", - "5. **Travel Delay Coverage:** This reimburses travelers for additional expenses incurred due to delays, such as accommodations and meals, especially when delays exceed a certain period.\n", + "6. **Travel Delay Coverage**:\n", + " - Covers additional expenses incurred if your trip is delayed for reasons such as severe weather, strikes, or other unexpected events.\n", "\n", - "6. **24/7 Assistance Services:** Many travel insurance providers offer round-the-clock assistance services to help travelers deal with emergencies, such as replacing lost passports, finding medical care, or arranging travel home.\n", + "7. **Accidental Death and Dismemberment Insurance**:\n", + " - This provides a benefit in case of accidental death or severe injury while traveling.\n", "\n", - "7. **Optional Add-ons:** Many policies offer optional add-ons like coverage for adventure sports, Cancel for Any Reason (CFAR) coverage, and more.\n", + "### Important Considerations\n", "\n", - "If you're looking for detailed and specific travel insurance products, it would be best to consult a reputable travel insurance provider or financial services company. Be sure to carefully review policy details to understand coverage limits, exclusions, and claims processes.\n", + "- **Exclusions**: It’s crucial to read the policy to understand what's not covered. Common exclusions include pre-existing medical conditions, risky activities (like extreme sports), or cancellations due to personal reasons not categorized as emergencies.\n", + " \n", + "- **Deductibles**: Some policies may require you to pay a certain amount out of pocket before coverage kicks in.\n", + "\n", + "- **Limits on Coverage**: There may be caps on how much you can claim for different types of expenses (like medical costs or baggage loss).\n", + "\n", + "To get accurate and specific information regarding travel insurance options from Contoso Travel or any actual travel agency, I recommend checking their official website or contacting their customer service team directly. They can provide detailed policy documents and assist with any specific queries you may have.\n", "\n", "Processing Query: What destinations and experiences are available through Contoso Travel?\n", - "Response: As Contoso Travel is a fictional company typically used in instructional materials, it does not offer real destinations or experiences. However, if we were to envision what a travel company like Contoso Travel might offer in terms of destinations and experiences, it would likely include a wide range of popular and exotic locations along with unique activities catered to different types of travelers. Here are some examples:\n", + "Response: While Contoso Travel is a fictional example commonly used in training materials, I can provide an illustrative overview of typical destinations and experiences that a travel agency like Contoso might offer. Here are some common categories of destinations and experiences you could expect:\n", + "\n", + "### Popular Destinations\n", + "\n", + "1. **Tropical Islands**:\n", + " - **Maldives**: Known for overwater bungalows, crystal-clear waters, and incredible snorkeling and diving opportunities.\n", + " - **Bora Bora**: Famous for its picturesque lagoons and luxury resorts, perfect for honeymooners or couples.\n", + "\n", + "2. **European Cities**:\n", + " - **Paris, France**: Tours that include visits to iconic landmarks like the Eiffel Tower, Louvre, and gourmet experiences in local cafes.\n", + " - **Rome, Italy**: Historical tours exploring ancient ruins such as the Colosseum and Vatican City, along with culinary classes.\n", + "\n", + "3. **Adventure Destinations**:\n", + " - **Costa Rica**: Packages that feature zip-lining through rainforests, surfing, and wildlife tours in national parks.\n", + " - **New Zealand**: Experiences may include bungee jumping, hiking the Tongariro Alpine Crossing, and exploring the picturesque landscapes featured in \"The Lord of the Rings.\"\n", "\n", - "### Destinations:\n", - "1. **European Cities:** \n", - " - Paris, France - Sightseeing at the Eiffel Tower, visits to world-class museums like the Louvre, and enjoying gourmet dining.\n", - " - Rome, Italy - Exploring ancient ruins, enjoying authentic Italian cuisine, and taking cooking classes.\n", - " - Barcelona, Spain - Discovering Gaudi's architecture, indulging in local tapas tours, and soaking up beach culture.\n", + "4. **Cultural Experiences**:\n", + " - **Kyoto, Japan**: Packages that allow travelers to visit traditional tea houses, the Arashiyama Bamboo Grove, and ancient temples.\n", + " - **Marrakech, Morocco**: Immersive experiences exploring souks, trying traditional Moroccan cooking, and staying in luxury riads.\n", "\n", - "2. **Tropical Getaways:**\n", - " - Bali, Indonesia - Relaxing in luxury resorts, engaging in yoga retreats, and exploring vibrant local culture.\n", - " - Maldives - Private overwater villas, snorkeling in coral reefs, and exclusive spa treatments.\n", + "5. **Safari Adventures**:\n", + " - **Kenya and Tanzania**: Luxury lodges and guided safari tours to see the Big Five (lion, leopard, rhinoceros, elephant, and Cape buffalo) in their natural habitat.\n", "\n", - "3. **Adventure Destinations:**\n", - " - New Zealand - Bungee jumping, hiking in national parks, and exploring Maori culture.\n", - " - Costa Rica - Zip-lining through rainforests, surfing, and wildlife tours.\n", + "6. **Cruises**:\n", + " - **Mediterranean Cruises**: Itineraries that include stops in multiple countries, such as Italy, Greece, and Spain, with opportunities for excursions in each port.\n", + " - **Alaskan Cruises**: Experiences focused on wildlife viewing, glacier touring, and exploring quaint coastal towns.\n", "\n", - "4. **Cultural Experiences:**\n", - " - Kyoto, Japan - Attending tea ceremonies, visiting historic temples, and experiencing traditional kaiseki dining.\n", - " - Marrakech, Morocco - Exploring souks, staying in luxury riads, and taking guided tours of the Atlas Mountains.\n", + "7. **Wellness Retreats**:\n", + " - **Bali, Indonesia**: Packages that include yoga retreats, spa treatments, and holistic wellness programs in tranquil settings.\n", + " - **Sedona, Arizona**: Experiences centered around healing, hiking, and spiritual wellness in a stunning natural environment.\n", "\n", - "5. **Safari Adventures:**\n", - " - Kenya - Guided safari tours in Maasai Mara, hot air balloon rides, and cultural visits to Maasai villages.\n", - " - South Africa - Game drives in Kruger National Park, vineyard tours in Stellenbosch, and exploring Cape Town.\n", + "### Unique Experiences\n", "\n", - "### Unique Experiences:\n", - "1. **Culinary Tours:** Guided tours that focus on local cuisine, including cooking classes, market visits, and wine tastings.\n", + "1. **Culinary Tours**: A focus on local food experiences, including cooking classes, wine tastings, and market visits to explore regional cuisines.\n", "\n", - "2. **Wellness Retreats:** Packages that include yoga, meditation, spa treatments, and healthy meals in serene settings.\n", + "2. **Wildlife Conservation Programs**: Opportunities to participate in volunteer programs that support wildlife conservation efforts, such as working with elephants in Thailand or rescuing sea turtles.\n", "\n", - "3. **Luxury Cruises:** Experiences on cruise ships with premium cabins, gourmet dining options, and curated shore excursions.\n", + "3. **Luxury Train Journeys**: Experiences like traveling on the Belmond Orient Express or Rocky Mountaineer, combining scenic vistas with sumptuous dining.\n", "\n", - "4. **Custom Itineraries:** Tailored travel plans based on individual interests, from art and history to outdoor adventures and family-friendly activities.\n", + "4. **Personalized Itineraries**: Customizable travel packages allowing clients to select their preferred activities, accommodations, and transportation options.\n", "\n", - "5. **Cultural Immersion:** Opportunities to engage with local communities, including home stays, volunteer projects, and participation in local festivals.\n", + "5. **Digital Nomad Packages**: Tailored itineraries for remote workers combining travel with work facilities, including co-working spaces in popular locations.\n", "\n", - "### Conclusion:\n", - "While the above examples offer a glimpse into what a travel agency like Contoso Travel might provide, it’s important to specify that no actual services are available from Contoso. For real travel experiences and packages, it is best to consult an established travel agency or explore reputable online travel platforms.\n" + "For specific offerings, experiences, and destinations from Contoso Travel or any other real-world travel agency, it’s best to check their official website or contact them directly to explore current packages and promotional deals.\n" ] } ],