Spaces:
Running
Running
File size: 42,953 Bytes
d1f719e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: pypdf in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (4.2.0)\n",
"Requirement already satisfied: sentence-transformers in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (2.2.2)\n",
"Requirement already satisfied: transformers<5.0.0,>=4.6.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from sentence-transformers) (4.41.1)\n",
"Requirement already satisfied: tqdm in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from sentence-transformers) (4.66.4)\n",
"Requirement already satisfied: torch>=1.6.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from sentence-transformers) (2.3.1)\n",
"Requirement already satisfied: torchvision in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from sentence-transformers) (0.18.1)\n",
"Requirement already satisfied: numpy in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from sentence-transformers) (1.26.4)\n",
"Requirement already satisfied: scikit-learn in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from sentence-transformers) (1.5.0)\n",
"Requirement already satisfied: scipy in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from sentence-transformers) (1.13.1)\n",
"Requirement already satisfied: nltk in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from sentence-transformers) (3.8.1)\n",
"Requirement already satisfied: sentencepiece in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from sentence-transformers) (0.2.0)\n",
"Requirement already satisfied: huggingface-hub>=0.4.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from sentence-transformers) (0.23.1)\n",
"Requirement already satisfied: filelock in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from huggingface-hub>=0.4.0->sentence-transformers) (3.14.0)\n",
"Requirement already satisfied: fsspec>=2023.5.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from huggingface-hub>=0.4.0->sentence-transformers) (2024.5.0)\n",
"Requirement already satisfied: packaging>=20.9 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from huggingface-hub>=0.4.0->sentence-transformers) (23.2)\n",
"Requirement already satisfied: pyyaml>=5.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from huggingface-hub>=0.4.0->sentence-transformers) (6.0.1)\n",
"Requirement already satisfied: requests in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from huggingface-hub>=0.4.0->sentence-transformers) (2.32.2)\n",
"Requirement already satisfied: typing-extensions>=3.7.4.3 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from huggingface-hub>=0.4.0->sentence-transformers) (4.11.0)\n",
"Requirement already satisfied: sympy in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch>=1.6.0->sentence-transformers) (1.12)\n",
"Requirement already satisfied: networkx in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch>=1.6.0->sentence-transformers) (3.3)\n",
"Requirement already satisfied: jinja2 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch>=1.6.0->sentence-transformers) (3.1.4)\n",
"Requirement already satisfied: mkl<=2021.4.0,>=2021.1.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch>=1.6.0->sentence-transformers) (2021.4.0)\n",
"Requirement already satisfied: colorama in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from tqdm->sentence-transformers) (0.4.6)\n",
"Requirement already satisfied: regex!=2019.12.17 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from transformers<5.0.0,>=4.6.0->sentence-transformers) (2024.5.15)\n",
"Requirement already satisfied: tokenizers<0.20,>=0.19 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from transformers<5.0.0,>=4.6.0->sentence-transformers) (0.19.1)\n",
"Requirement already satisfied: safetensors>=0.4.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from transformers<5.0.0,>=4.6.0->sentence-transformers) (0.4.3)\n",
"Requirement already satisfied: click in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from nltk->sentence-transformers) (8.1.7)\n",
"Requirement already satisfied: joblib in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from nltk->sentence-transformers) (1.4.2)\n",
"Requirement already satisfied: threadpoolctl>=3.1.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from scikit-learn->sentence-transformers) (3.5.0)\n",
"Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torchvision->sentence-transformers) (10.3.0)\n",
"Requirement already satisfied: intel-openmp==2021.* in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch>=1.6.0->sentence-transformers) (2021.4.0)\n",
"Requirement already satisfied: tbb==2021.* in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch>=1.6.0->sentence-transformers) (2021.12.0)\n",
"Requirement already satisfied: MarkupSafe>=2.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from jinja2->torch>=1.6.0->sentence-transformers) (2.1.5)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests->huggingface-hub>=0.4.0->sentence-transformers) (3.3.2)\n",
"Requirement already satisfied: idna<4,>=2.5 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests->huggingface-hub>=0.4.0->sentence-transformers) (3.7)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests->huggingface-hub>=0.4.0->sentence-transformers) (2.2.1)\n",
"Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests->huggingface-hub>=0.4.0->sentence-transformers) (2024.2.2)\n",
"Requirement already satisfied: mpmath>=0.19 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from sympy->torch>=1.6.0->sentence-transformers) (1.3.0)\n",
"Collecting llama_index\n",
" Downloading llama_index-0.10.44-py3-none-any.whl.metadata (11 kB)\n",
"Collecting llama-index-agent-openai<0.3.0,>=0.1.4 (from llama_index)\n",
" Downloading llama_index_agent_openai-0.2.7-py3-none-any.whl.metadata (678 bytes)\n",
"Collecting llama-index-cli<0.2.0,>=0.1.2 (from llama_index)\n",
" Downloading llama_index_cli-0.1.12-py3-none-any.whl.metadata (1.5 kB)\n",
"Collecting llama-index-core==0.10.44 (from llama_index)\n",
" Downloading llama_index_core-0.10.44-py3-none-any.whl.metadata (2.4 kB)\n",
"Collecting llama-index-embeddings-openai<0.2.0,>=0.1.5 (from llama_index)\n",
" Downloading llama_index_embeddings_openai-0.1.10-py3-none-any.whl.metadata (604 bytes)\n",
"Collecting llama-index-indices-managed-llama-cloud<0.2.0,>=0.1.2 (from llama_index)\n",
" Downloading llama_index_indices_managed_llama_cloud-0.1.6-py3-none-any.whl.metadata (3.8 kB)\n",
"Collecting llama-index-legacy<0.10.0,>=0.9.48 (from llama_index)\n",
" Downloading llama_index_legacy-0.9.48-py3-none-any.whl.metadata (8.5 kB)\n",
"Collecting llama-index-llms-openai<0.2.0,>=0.1.13 (from llama_index)\n",
" Downloading llama_index_llms_openai-0.1.22-py3-none-any.whl.metadata (559 bytes)\n",
"Collecting llama-index-multi-modal-llms-openai<0.2.0,>=0.1.3 (from llama_index)\n",
" Downloading llama_index_multi_modal_llms_openai-0.1.6-py3-none-any.whl.metadata (677 bytes)\n",
"Collecting llama-index-program-openai<0.2.0,>=0.1.3 (from llama_index)\n",
" Downloading llama_index_program_openai-0.1.6-py3-none-any.whl.metadata (715 bytes)\n",
"Collecting llama-index-question-gen-openai<0.2.0,>=0.1.2 (from llama_index)\n",
" Downloading llama_index_question_gen_openai-0.1.3-py3-none-any.whl.metadata (785 bytes)\n",
"Collecting llama-index-readers-file<0.2.0,>=0.1.4 (from llama_index)\n",
" Downloading llama_index_readers_file-0.1.25-py3-none-any.whl.metadata (5.4 kB)\n",
"Collecting llama-index-readers-llama-parse<0.2.0,>=0.1.2 (from llama_index)\n",
" Downloading llama_index_readers_llama_parse-0.1.4-py3-none-any.whl.metadata (3.5 kB)\n",
"Requirement already satisfied: PyYAML>=6.0.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (6.0.1)\n",
"Requirement already satisfied: SQLAlchemy>=1.4.49 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from SQLAlchemy[asyncio]>=1.4.49->llama-index-core==0.10.44->llama_index) (2.0.30)\n",
"Requirement already satisfied: aiohttp<4.0.0,>=3.8.6 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (3.9.5)\n",
"Requirement already satisfied: dataclasses-json in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (0.5.14)\n",
"Collecting deprecated>=1.2.9.3 (from llama-index-core==0.10.44->llama_index)\n",
" Downloading Deprecated-1.2.14-py2.py3-none-any.whl.metadata (5.4 kB)\n",
"Collecting dirtyjson<2.0.0,>=1.0.8 (from llama-index-core==0.10.44->llama_index)\n",
" Downloading dirtyjson-1.0.8-py3-none-any.whl.metadata (11 kB)\n",
"Requirement already satisfied: fsspec>=2023.5.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (2024.5.0)\n",
"Requirement already satisfied: httpx in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (0.27.0)\n",
"Collecting llamaindex-py-client<0.2.0,>=0.1.18 (from llama-index-core==0.10.44->llama_index)\n",
" Downloading llamaindex_py_client-0.1.19-py3-none-any.whl.metadata (760 bytes)\n",
"Requirement already satisfied: nest-asyncio<2.0.0,>=1.5.8 in c:\\users\\kirai\\appdata\\roaming\\python\\python312\\site-packages (from llama-index-core==0.10.44->llama_index) (1.6.0)\n",
"Requirement already satisfied: networkx>=3.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (3.3)\n",
"Requirement already satisfied: nltk<4.0.0,>=3.8.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (3.8.1)\n",
"Requirement already satisfied: numpy in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (1.26.4)\n",
"Collecting openai>=1.1.0 (from llama-index-core==0.10.44->llama_index)\n",
" Using cached openai-1.34.0-py3-none-any.whl.metadata (21 kB)\n",
"Requirement already satisfied: pandas in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (2.2.2)\n",
"Requirement already satisfied: pillow>=9.0.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (10.3.0)\n",
"Requirement already satisfied: requests>=2.31.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (2.32.2)\n",
"Requirement already satisfied: tenacity<9.0.0,>=8.2.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (8.3.0)\n",
"Collecting tiktoken>=0.3.3 (from llama-index-core==0.10.44->llama_index)\n",
" Downloading tiktoken-0.7.0-cp312-cp312-win_amd64.whl.metadata (6.8 kB)\n",
"Requirement already satisfied: tqdm<5.0.0,>=4.66.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (4.66.4)\n",
"Requirement already satisfied: typing-extensions>=4.5.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (4.11.0)\n",
"Requirement already satisfied: typing-inspect>=0.8.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (0.9.0)\n",
"Requirement already satisfied: wrapt in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-core==0.10.44->llama_index) (1.16.0)\n",
"Requirement already satisfied: beautifulsoup4<5.0.0,>=4.12.3 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-readers-file<0.2.0,>=0.1.4->llama_index) (4.12.3)\n",
"Requirement already satisfied: pypdf<5.0.0,>=4.0.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llama-index-readers-file<0.2.0,>=0.1.4->llama_index) (4.2.0)\n",
"Collecting striprtf<0.0.27,>=0.0.26 (from llama-index-readers-file<0.2.0,>=0.1.4->llama_index)\n",
" Downloading striprtf-0.0.26-py3-none-any.whl.metadata (2.1 kB)\n",
"Collecting llama-parse<0.5.0,>=0.4.0 (from llama-index-readers-llama-parse<0.2.0,>=0.1.2->llama_index)\n",
" Downloading llama_parse-0.4.4-py3-none-any.whl.metadata (3.5 kB)\n",
"Requirement already satisfied: aiosignal>=1.1.2 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core==0.10.44->llama_index) (1.3.1)\n",
"Requirement already satisfied: attrs>=17.3.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core==0.10.44->llama_index) (23.2.0)\n",
"Requirement already satisfied: frozenlist>=1.1.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core==0.10.44->llama_index) (1.4.1)\n",
"Requirement already satisfied: multidict<7.0,>=4.5 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core==0.10.44->llama_index) (6.0.5)\n",
"Requirement already satisfied: yarl<2.0,>=1.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core==0.10.44->llama_index) (1.9.4)\n",
"Requirement already satisfied: soupsieve>1.2 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from beautifulsoup4<5.0.0,>=4.12.3->llama-index-readers-file<0.2.0,>=0.1.4->llama_index) (2.5)\n",
"Requirement already satisfied: pydantic>=1.10 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from llamaindex-py-client<0.2.0,>=0.1.18->llama-index-core==0.10.44->llama_index) (1.10.16)\n",
"Requirement already satisfied: anyio in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from httpx->llama-index-core==0.10.44->llama_index) (4.3.0)\n",
"Requirement already satisfied: certifi in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from httpx->llama-index-core==0.10.44->llama_index) (2024.2.2)\n",
"Requirement already satisfied: httpcore==1.* in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from httpx->llama-index-core==0.10.44->llama_index) (1.0.5)\n",
"Requirement already satisfied: idna in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from httpx->llama-index-core==0.10.44->llama_index) (3.7)\n",
"Requirement already satisfied: sniffio in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from httpx->llama-index-core==0.10.44->llama_index) (1.3.1)\n",
"Requirement already satisfied: h11<0.15,>=0.13 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from httpcore==1.*->httpx->llama-index-core==0.10.44->llama_index) (0.14.0)\n",
"Requirement already satisfied: click in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from nltk<4.0.0,>=3.8.1->llama-index-core==0.10.44->llama_index) (8.1.7)\n",
"Requirement already satisfied: joblib in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from nltk<4.0.0,>=3.8.1->llama-index-core==0.10.44->llama_index) (1.4.2)\n",
"Requirement already satisfied: regex>=2021.8.3 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from nltk<4.0.0,>=3.8.1->llama-index-core==0.10.44->llama_index) (2024.5.15)\n",
"Collecting distro<2,>=1.7.0 (from openai>=1.1.0->llama-index-core==0.10.44->llama_index)\n",
" Using cached distro-1.9.0-py3-none-any.whl.metadata (6.8 kB)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests>=2.31.0->llama-index-core==0.10.44->llama_index) (3.3.2)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests>=2.31.0->llama-index-core==0.10.44->llama_index) (2.2.1)\n",
"Requirement already satisfied: greenlet!=0.4.17 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from SQLAlchemy>=1.4.49->SQLAlchemy[asyncio]>=1.4.49->llama-index-core==0.10.44->llama_index) (3.0.3)\n",
"Requirement already satisfied: colorama in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from tqdm<5.0.0,>=4.66.1->llama-index-core==0.10.44->llama_index) (0.4.6)\n",
"Requirement already satisfied: mypy-extensions>=0.3.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from typing-inspect>=0.8.0->llama-index-core==0.10.44->llama_index) (1.0.0)\n",
"Requirement already satisfied: marshmallow<4.0.0,>=3.18.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from dataclasses-json->llama-index-core==0.10.44->llama_index) (3.21.3)\n",
"Requirement already satisfied: python-dateutil>=2.8.2 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from pandas->llama-index-core==0.10.44->llama_index) (2.9.0.post0)\n",
"Requirement already satisfied: pytz>=2020.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from pandas->llama-index-core==0.10.44->llama_index) (2024.1)\n",
"Requirement already satisfied: tzdata>=2022.7 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from pandas->llama-index-core==0.10.44->llama_index) (2024.1)\n",
"Requirement already satisfied: packaging>=17.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from marshmallow<4.0.0,>=3.18.0->dataclasses-json->llama-index-core==0.10.44->llama_index) (23.2)\n",
"Requirement already satisfied: six>=1.5 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from python-dateutil>=2.8.2->pandas->llama-index-core==0.10.44->llama_index) (1.16.0)\n",
"Downloading llama_index-0.10.44-py3-none-any.whl (6.8 kB)\n",
"Downloading llama_index_core-0.10.44-py3-none-any.whl (15.4 MB)\n",
" ---------------------------------------- 0.0/15.4 MB ? eta -:--:--\n",
" --------------------------------------- 0.3/15.4 MB 2.6 MB/s eta 0:00:06\n",
" - -------------------------------------- 0.6/15.4 MB 2.5 MB/s eta 0:00:06\n",
" -- ------------------------------------- 1.0/15.4 MB 2.9 MB/s eta 0:00:05\n",
" --- ------------------------------------ 1.2/15.4 MB 3.0 MB/s eta 0:00:05\n",
" ---- ----------------------------------- 1.7/15.4 MB 2.8 MB/s eta 0:00:05\n",
" ----- ---------------------------------- 2.1/15.4 MB 2.9 MB/s eta 0:00:05\n",
" ------- -------------------------------- 2.9/15.4 MB 3.1 MB/s eta 0:00:04\n",
" -------- ------------------------------- 3.2/15.4 MB 3.2 MB/s eta 0:00:04\n",
" --------- ------------------------------ 3.6/15.4 MB 3.2 MB/s eta 0:00:04\n",
" ---------- ----------------------------- 3.9/15.4 MB 3.1 MB/s eta 0:00:04\n",
" ----------- ---------------------------- 4.4/15.4 MB 3.2 MB/s eta 0:00:04\n",
" ------------ --------------------------- 4.8/15.4 MB 3.3 MB/s eta 0:00:04\n",
" ------------- -------------------------- 5.1/15.4 MB 3.2 MB/s eta 0:00:04\n",
" -------------- ------------------------- 5.7/15.4 MB 3.1 MB/s eta 0:00:04\n",
" ----------------- ---------------------- 6.6/15.4 MB 3.2 MB/s eta 0:00:03\n",
" ------------------ --------------------- 7.1/15.4 MB 3.3 MB/s eta 0:00:03\n",
" --------------------- ------------------ 8.2/15.4 MB 3.2 MB/s eta 0:00:03\n",
" ----------------------- ---------------- 9.1/15.4 MB 3.3 MB/s eta 0:00:02\n",
" ------------------------ --------------- 9.6/15.4 MB 3.3 MB/s eta 0:00:02\n",
" ------------------------- -------------- 9.9/15.4 MB 3.2 MB/s eta 0:00:02\n",
" -------------------------- ------------- 10.3/15.4 MB 3.2 MB/s eta 0:00:02\n",
" --------------------------- ------------ 10.7/15.4 MB 3.3 MB/s eta 0:00:02\n",
" ---------------------------- ----------- 11.2/15.4 MB 3.2 MB/s eta 0:00:02\n",
" ----------------------------- ---------- 11.4/15.4 MB 3.0 MB/s eta 0:00:02\n",
" ------------------------------ --------- 11.7/15.4 MB 3.0 MB/s eta 0:00:02\n",
" ------------------------------- -------- 12.1/15.4 MB 2.8 MB/s eta 0:00:02\n",
" ------------------------------- -------- 12.3/15.4 MB 2.7 MB/s eta 0:00:02\n",
" -------------------------------- ------- 12.4/15.4 MB 2.7 MB/s eta 0:00:02\n",
" -------------------------------- ------- 12.5/15.4 MB 2.6 MB/s eta 0:00:02\n",
" -------------------------------- ------- 12.6/15.4 MB 2.6 MB/s eta 0:00:02\n",
" --------------------------------- ------ 12.8/15.4 MB 2.5 MB/s eta 0:00:02\n",
" --------------------------------- ------ 12.9/15.4 MB 2.4 MB/s eta 0:00:02\n",
" --------------------------------- ------ 13.0/15.4 MB 2.4 MB/s eta 0:00:02\n",
" --------------------------------- ------ 13.1/15.4 MB 2.3 MB/s eta 0:00:01\n",
" --------------------------------- ------ 13.1/15.4 MB 2.3 MB/s eta 0:00:01\n",
" ---------------------------------- ----- 13.4/15.4 MB 2.2 MB/s eta 0:00:01\n",
" ---------------------------------- ----- 13.5/15.4 MB 2.2 MB/s eta 0:00:01\n",
" ----------------------------------- ---- 13.6/15.4 MB 2.2 MB/s eta 0:00:01\n",
" ----------------------------------- ---- 13.8/15.4 MB 2.1 MB/s eta 0:00:01\n",
" ------------------------------------ --- 13.9/15.4 MB 2.1 MB/s eta 0:00:01\n",
" ------------------------------------ --- 14.0/15.4 MB 2.0 MB/s eta 0:00:01\n",
" ------------------------------------ --- 14.2/15.4 MB 2.0 MB/s eta 0:00:01\n",
" ------------------------------------- -- 14.4/15.4 MB 2.0 MB/s eta 0:00:01\n",
" ------------------------------------- -- 14.6/15.4 MB 1.9 MB/s eta 0:00:01\n",
" -------------------------------------- - 14.8/15.4 MB 1.9 MB/s eta 0:00:01\n",
" -------------------------------------- - 15.0/15.4 MB 1.8 MB/s eta 0:00:01\n",
" --------------------------------------- 15.3/15.4 MB 1.8 MB/s eta 0:00:01\n",
" --------------------------------------- 15.4/15.4 MB 1.8 MB/s eta 0:00:01\n",
" --------------------------------------- 15.4/15.4 MB 1.8 MB/s eta 0:00:01\n",
" --------------------------------------- 15.4/15.4 MB 1.8 MB/s eta 0:00:01\n",
" ---------------------------------------- 15.4/15.4 MB 1.7 MB/s eta 0:00:00\n",
"Downloading llama_index_agent_openai-0.2.7-py3-none-any.whl (12 kB)\n",
"Downloading llama_index_cli-0.1.12-py3-none-any.whl (26 kB)\n",
"Downloading llama_index_embeddings_openai-0.1.10-py3-none-any.whl (6.2 kB)\n",
"Downloading llama_index_indices_managed_llama_cloud-0.1.6-py3-none-any.whl (6.7 kB)\n",
"Downloading llama_index_legacy-0.9.48-py3-none-any.whl (2.0 MB)\n",
" ---------------------------------------- 0.0/2.0 MB ? eta -:--:--\n",
" --------- ------------------------------ 0.5/2.0 MB 4.0 MB/s eta 0:00:01\n",
" -------------- ------------------------- 0.7/2.0 MB 2.4 MB/s eta 0:00:01\n",
" ---------------- ----------------------- 0.8/2.0 MB 2.2 MB/s eta 0:00:01\n",
" ---------------------- ----------------- 1.1/2.0 MB 1.9 MB/s eta 0:00:01\n",
" ----------------------- ---------------- 1.2/2.0 MB 1.8 MB/s eta 0:00:01\n",
" --------------------------- ------------ 1.3/2.0 MB 1.7 MB/s eta 0:00:01\n",
" ----------------------------- ---------- 1.5/2.0 MB 1.5 MB/s eta 0:00:01\n",
" -------------------------------- ------- 1.6/2.0 MB 1.4 MB/s eta 0:00:01\n",
" ---------------------------------- ----- 1.7/2.0 MB 1.3 MB/s eta 0:00:01\n",
" ----------------------------------- ---- 1.8/2.0 MB 1.2 MB/s eta 0:00:01\n",
" -------------------------------------- - 1.9/2.0 MB 1.2 MB/s eta 0:00:01\n",
" --------------------------------------- 2.0/2.0 MB 1.2 MB/s eta 0:00:01\n",
" ---------------------------------------- 2.0/2.0 MB 1.1 MB/s eta 0:00:00\n",
"Downloading llama_index_llms_openai-0.1.22-py3-none-any.whl (11 kB)\n",
"Downloading llama_index_multi_modal_llms_openai-0.1.6-py3-none-any.whl (5.8 kB)\n",
"Downloading llama_index_program_openai-0.1.6-py3-none-any.whl (5.2 kB)\n",
"Downloading llama_index_question_gen_openai-0.1.3-py3-none-any.whl (2.9 kB)\n",
"Downloading llama_index_readers_file-0.1.25-py3-none-any.whl (37 kB)\n",
"Downloading llama_index_readers_llama_parse-0.1.4-py3-none-any.whl (2.5 kB)\n",
"Downloading Deprecated-1.2.14-py2.py3-none-any.whl (9.6 kB)\n",
"Downloading dirtyjson-1.0.8-py3-none-any.whl (25 kB)\n",
"Downloading llama_parse-0.4.4-py3-none-any.whl (8.0 kB)\n",
"Downloading llamaindex_py_client-0.1.19-py3-none-any.whl (141 kB)\n",
" ---------------------------------------- 0.0/141.9 kB ? eta -:--:--\n",
" ---------------------------------------- 141.9/141.9 kB 4.2 MB/s eta 0:00:00\n",
"Using cached openai-1.34.0-py3-none-any.whl (325 kB)\n",
"Downloading striprtf-0.0.26-py3-none-any.whl (6.9 kB)\n",
"Downloading tiktoken-0.7.0-cp312-cp312-win_amd64.whl (799 kB)\n",
" ---------------------------------------- 0.0/799.3 kB ? eta -:--:--\n",
" ---------------- ----------------------- 327.7/799.3 kB 3.4 MB/s eta 0:00:01\n",
" -------------------- ------------------- 409.6/799.3 kB 1.6 MB/s eta 0:00:01\n",
" ----------------------- ---------------- 471.0/799.3 kB 1.3 MB/s eta 0:00:01\n",
" -------------------------- ------------- 522.2/799.3 kB 1.2 MB/s eta 0:00:01\n",
" ----------------------------- ---------- 583.7/799.3 kB 1.1 MB/s eta 0:00:01\n",
" ------------------------------ ------- 634.9/799.3 kB 952.2 kB/s eta 0:00:01\n",
" ---------------------------------- --- 716.8/799.3 kB 923.6 kB/s eta 0:00:01\n",
" ------------------------------------ - 778.2/799.3 kB 877.7 kB/s eta 0:00:01\n",
" -------------------------------------- 799.3/799.3 kB 855.8 kB/s eta 0:00:00\n",
"Using cached distro-1.9.0-py3-none-any.whl (20 kB)\n",
"Installing collected packages: striprtf, dirtyjson, distro, deprecated, tiktoken, openai, llamaindex-py-client, llama-index-legacy, llama-index-core, llama-parse, llama-index-readers-file, llama-index-llms-openai, llama-index-indices-managed-llama-cloud, llama-index-embeddings-openai, llama-index-readers-llama-parse, llama-index-multi-modal-llms-openai, llama-index-cli, llama-index-agent-openai, llama-index-program-openai, llama-index-question-gen-openai, llama_index\n",
"Successfully installed deprecated-1.2.14 dirtyjson-1.0.8 distro-1.9.0 llama-index-agent-openai-0.2.7 llama-index-cli-0.1.12 llama-index-core-0.10.44 llama-index-embeddings-openai-0.1.10 llama-index-indices-managed-llama-cloud-0.1.6 llama-index-legacy-0.9.48 llama-index-llms-openai-0.1.22 llama-index-multi-modal-llms-openai-0.1.6 llama-index-program-openai-0.1.6 llama-index-question-gen-openai-0.1.3 llama-index-readers-file-0.1.25 llama-index-readers-llama-parse-0.1.4 llama-parse-0.4.4 llama_index-0.10.44 llamaindex-py-client-0.1.19 openai-1.34.0 striprtf-0.0.26 tiktoken-0.7.0\n",
"Requirement already satisfied: langchain in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (0.0.225)\n",
"Requirement already satisfied: PyYAML>=5.4.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from langchain) (6.0.1)\n",
"Requirement already satisfied: SQLAlchemy<3,>=1.4 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from langchain) (2.0.30)\n",
"Requirement already satisfied: aiohttp<4.0.0,>=3.8.3 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from langchain) (3.9.5)\n",
"Requirement already satisfied: dataclasses-json<0.6.0,>=0.5.7 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from langchain) (0.5.14)\n",
"Requirement already satisfied: langchainplus-sdk<0.0.21,>=0.0.20 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from langchain) (0.0.20)\n",
"Requirement already satisfied: numexpr<3.0.0,>=2.8.4 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from langchain) (2.10.0)\n",
"Requirement already satisfied: numpy<2,>=1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from langchain) (1.26.4)\n",
"Requirement already satisfied: openapi-schema-pydantic<2.0,>=1.2 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from langchain) (1.2.4)\n",
"Requirement already satisfied: pydantic<2,>=1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from langchain) (1.10.16)\n",
"Requirement already satisfied: requests<3,>=2 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from langchain) (2.32.2)\n",
"Requirement already satisfied: tenacity<9.0.0,>=8.1.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from langchain) (8.3.0)\n",
"Requirement already satisfied: aiosignal>=1.1.2 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.3.1)\n",
"Requirement already satisfied: attrs>=17.3.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (23.2.0)\n",
"Requirement already satisfied: frozenlist>=1.1.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.4.1)\n",
"Requirement already satisfied: multidict<7.0,>=4.5 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (6.0.5)\n",
"Requirement already satisfied: yarl<2.0,>=1.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.9.4)\n",
"Requirement already satisfied: marshmallow<4.0.0,>=3.18.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from dataclasses-json<0.6.0,>=0.5.7->langchain) (3.21.3)\n",
"Requirement already satisfied: typing-inspect<1,>=0.4.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from dataclasses-json<0.6.0,>=0.5.7->langchain) (0.9.0)\n",
"Requirement already satisfied: typing-extensions>=4.2.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from pydantic<2,>=1->langchain) (4.11.0)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests<3,>=2->langchain) (3.3.2)\n",
"Requirement already satisfied: idna<4,>=2.5 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests<3,>=2->langchain) (3.7)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests<3,>=2->langchain) (2.2.1)\n",
"Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests<3,>=2->langchain) (2024.2.2)\n",
"Requirement already satisfied: greenlet!=0.4.17 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from SQLAlchemy<3,>=1.4->langchain) (3.0.3)\n",
"Requirement already satisfied: packaging>=17.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from marshmallow<4.0.0,>=3.18.0->dataclasses-json<0.6.0,>=0.5.7->langchain) (23.2)\n",
"Requirement already satisfied: mypy-extensions>=0.3.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from typing-inspect<1,>=0.4.0->dataclasses-json<0.6.0,>=0.5.7->langchain) (1.0.0)\n",
"Requirement already satisfied: torch in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (2.3.1)\n",
"Requirement already satisfied: filelock in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch) (3.14.0)\n",
"Requirement already satisfied: typing-extensions>=4.8.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch) (4.11.0)\n",
"Requirement already satisfied: sympy in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch) (1.12)\n",
"Requirement already satisfied: networkx in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch) (3.3)\n",
"Requirement already satisfied: jinja2 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch) (3.1.4)\n",
"Requirement already satisfied: fsspec in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch) (2024.5.0)\n",
"Requirement already satisfied: mkl<=2021.4.0,>=2021.1.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch) (2021.4.0)\n",
"Requirement already satisfied: intel-openmp==2021.* in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch) (2021.4.0)\n",
"Requirement already satisfied: tbb==2021.* in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch) (2021.12.0)\n",
"Requirement already satisfied: MarkupSafe>=2.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from jinja2->torch) (2.1.5)\n",
"Requirement already satisfied: mpmath>=0.19 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from sympy->torch) (1.3.0)\n",
"Requirement already satisfied: huggingface_hub in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (0.23.1)\n",
"Requirement already satisfied: filelock in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from huggingface_hub) (3.14.0)\n",
"Requirement already satisfied: fsspec>=2023.5.0 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from huggingface_hub) (2024.5.0)\n",
"Requirement already satisfied: packaging>=20.9 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from huggingface_hub) (23.2)\n",
"Requirement already satisfied: pyyaml>=5.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from huggingface_hub) (6.0.1)\n",
"Requirement already satisfied: requests in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from huggingface_hub) (2.32.2)\n",
"Requirement already satisfied: tqdm>=4.42.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from huggingface_hub) (4.66.4)\n",
"Requirement already satisfied: typing-extensions>=3.7.4.3 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from huggingface_hub) (4.11.0)\n",
"Requirement already satisfied: colorama in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from tqdm>=4.42.1->huggingface_hub) (0.4.6)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests->huggingface_hub) (3.3.2)\n",
"Requirement already satisfied: idna<4,>=2.5 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests->huggingface_hub) (3.7)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests->huggingface_hub) (2.2.1)\n",
"Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\kirai\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests->huggingface_hub) (2024.2.2)\n"
]
}
],
"source": [
"!pip install pypdf\n",
"!pip install sentence-transformers\n",
"!pip install llama_index\n",
"!pip install langchain\n",
"!pip install torch\n",
"!pip install huggingface_hub"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'llama_index'",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[2], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mllama_index\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m VectorStoreIndex, SimpleDirectoryReader, ServiceContext\n\u001b[0;32m 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mllama_index\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mllms\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m HuggingFaceLLM\n\u001b[0;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mllama_index\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mprompts\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mprompts\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m SimpleInputPrompt\n",
"\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'llama_index'"
]
}
],
"source": [
"from llama_index import VectorStoreIndex, SimpleDirectoryReader, ServiceContext\n",
"from llama_index.llms import HuggingFaceLLM\n",
"from llama_index.prompts.prompts import SimpleInputPrompt\n",
"from langchain.embeddings.huggingface import HuggingFaceEmbeddings\n",
"from llama_index.embeddings import LangchainEmbedding\n",
"import torch\n",
"import chromadb\n",
"from chromadb.utils import embedding_functions"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"documents = SimpleDirectoryReader(\"/content/data\").load_data()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"system_prompt = \"\"\"\n",
"You are a Q&A assistant. Your goal is to answer questions as\n",
"accurately as possible based on the instructions and context provided.\n",
"query_wrapper_prompt = SimpleInputPrompt(\"{query_str}\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "mchatbot",
"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.8.19"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
|