diff --git a/.github/workflows/build_package.yml b/.github/workflows/build_package.yml new file mode 100644 index 0000000..acdcaec --- /dev/null +++ b/.github/workflows/build_package.yml @@ -0,0 +1,48 @@ +name: Build Package + +# Build package on its own without additional pip install + +on: + push: + branches: + - main + pull_request: + +env: + POETRY_VERSION: "1.6.1" + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + # You can use PyPy versions in python-version. + # For example, pypy-2.7 and pypy-3.8 + matrix: + os: [ubuntu-latest, windows-latest] + python-version: ["3.9"] + steps: + - uses: actions/checkout@v3 + - name: Set up python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: ${{ env.POETRY_VERSION }} + - name: Install deps + shell: bash + run: poetry install + - name: Ensure lock works + shell: bash + run: poetry lock + - name: Build + shell: bash + run: poetry build + - name: Test installing built package + shell: bash + run: python -m pip install . + - name: Test import + shell: bash + working-directory: ${{ vars.RUNNER_TEMP }} + run: python -c "import llama_parse" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..fe69b67 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,81 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: ["main"] + pull_request: + # The branches below must be a subset of the branches above + branches: ["main"] + schedule: + - cron: "30 16 * * 4" + +jobs: + analyze: + name: Analyze + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners + # Consider using larger runners for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: ["python"] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] + # Use only 'java' to analyze code written in Java, Kotlin or both + # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..c497424 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,37 @@ +name: Linting + +on: + push: + branches: + - main + pull_request: + +env: + POETRY_VERSION: "1.6.1" + +jobs: + build: + runs-on: ubuntu-latest + strategy: + # You can use PyPy versions in python-version. + # For example, pypy-2.7 and pypy-3.8 + matrix: + python-version: ["3.9"] + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }} + - name: Set up python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: ${{ env.POETRY_VERSION }} + - name: Install pre-commit + shell: bash + run: poetry run pip install pre-commit + - name: Run linter + shell: bash + run: poetry run make lint diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml new file mode 100644 index 0000000..e3eed55 --- /dev/null +++ b/.github/workflows/publish_release.yml @@ -0,0 +1,64 @@ +name: Publish llama-parse to PyPI / GitHub + +on: + push: + tags: + - "v*" + + workflow_dispatch: + +env: + POETRY_VERSION: "1.6.1" + PYTHON_VERSION: "3.9" + +jobs: + build-n-publish: + name: Build and publish to PyPI + if: github.repository == 'run-llama/llama_parse' + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@v4 + with: + python-version: ${{ env.PYTHON_VERSION }} + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: ${{ env.POETRY_VERSION }} + - name: Install deps + shell: bash + run: pip install -e . + - name: Build and publish to pypi + uses: JRubics/poetry-publish@v1.17 + with: + pypi_token: ${{ secrets.LLAMA_PARSE_PYPI_TOKEN }} + ignore_dev_requirements: "yes" + + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: false + prerelease: false + + - name: Get Asset name + run: | + export PKG=$(ls dist/ | grep tar) + set -- $PKG + echo "name=$1" >> $GITHUB_ENV + - name: Upload Release Asset (sdist) to GitHub + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: dist/${{ env.name }} + asset_name: ${{ env.name }} + asset_content_type: application/zip diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml new file mode 100644 index 0000000..fa73dd9 --- /dev/null +++ b/.github/workflows/unit_test.yml @@ -0,0 +1,40 @@ +name: Unit Testing + +on: + push: + branches: + - main + pull_request: + +env: + POETRY_VERSION: "1.6.1" + LLAMA_CLOUD_API_KEY: ${{ secrets.LLAMA_CLOUD_API_KEY }} + +jobs: + test: + runs-on: ubuntu-latest + strategy: + # You can use PyPy versions in python-version. + # For example, pypy-2.7 and pypy-3.8 + matrix: + python-version: ["3.8", "3.10", "3.11"] + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: ${{ env.POETRY_VERSION }} + - name: Install deps + shell: bash + run: poetry install --with dev + - name: Run testing + env: + CI: true + shell: bash + run: poetry run pytest tests diff --git a/.gitignore b/.gitignore index 1db5207..d324c63 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .git __pycache__/ *.pyc -.DS_Store \ No newline at end of file +.DS_Store diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..55b86d3 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,86 @@ +--- +default_language_version: + python: python3 + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: check-byte-order-marker + - id: check-merge-conflict + - id: check-symlinks + - id: check-toml + - id: check-yaml + - id: detect-private-key + - id: end-of-file-fixer + - id: mixed-line-ending + - id: trailing-whitespace + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.1.5 + + hooks: + - id: ruff + args: [--fix, --exit-non-zero-on-fix] + exclude: ".*poetry.lock" + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 23.10.1 + hooks: + - id: black-jupyter + name: black-src + alias: black + exclude: ".*poetry.lock" + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.0.1 + hooks: + - id: mypy + additional_dependencies: + [ + "types-requests", + "types-Deprecated", + "types-redis", + "types-setuptools", + "types-PyYAML", + "types-protobuf==4.24.0.4", + ] + args: + [ + --disallow-untyped-defs, + --ignore-missing-imports, + --python-version=3.8, + ] + - repo: https://github.com/adamchainz/blacken-docs + rev: 1.16.0 + hooks: + - id: blacken-docs + name: black-docs-text + alias: black + types_or: [rst, markdown, tex] + additional_dependencies: [black==23.10.1] + # Using PEP 8's line length in docs prevents excess left/right scrolling + args: [--line-length=79] + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.0.3 + hooks: + - id: prettier + exclude: poetry.lock + - repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + additional_dependencies: [tomli] + exclude: ^(poetry.lock|examples) + args: + [ + "--ignore-words-list", + "astroid,gallary,momento,narl,ot,rouge,nin,gere,te,inh", + ] + - repo: https://github.com/srstevenson/nb-clean + rev: 3.1.0 + hooks: + - id: nb-clean + args: [--preserve-cell-outputs, --remove-empty-cells] + - repo: https://github.com/pappasam/toml-sort + rev: v0.23.1 + hooks: + - id: toml-sort-fix + exclude: ".*poetry.lock" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c73ae8e --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +GIT_ROOT ?= $(shell git rev-parse --show-toplevel) + +help: ## Show all Makefile targets. + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}' + +format: ## Run code autoformatters (black). + pre-commit install + git ls-files | xargs pre-commit run black --files + +lint: ## Run linters: pre-commit (black, ruff, codespell) and mypy + pre-commit install && git ls-files | xargs pre-commit run --show-diff-on-failure --files + +test: ## Run tests via pytest + pytest tests diff --git a/README.md b/README.md index 7741ba0..aba800c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ LlamaParse is an API created by LlamaIndex to efficiently parse and represent fi LlamaParse directly integrates with [LlamaIndex](https://github.com/run-llama/llama_index). - Free plan is up to 1000 pages a day. Paid plan is free 7k pages per week + 0.3c per additional page. ## Getting Started @@ -28,6 +27,7 @@ Now you can run the following to parse your first PDF file: ```python import nest_asyncio + nest_asyncio.apply() from llama_parse import LlamaParse @@ -35,9 +35,9 @@ from llama_parse import LlamaParse parser = LlamaParse( api_key="llx-...", # can also be set in your env as LLAMA_CLOUD_API_KEY result_type="markdown", # "markdown" and "text" are available - num_workers=4, # if multiple files passed, split in `num_workers` API calls + num_workers=4, # if multiple files passed, split in `num_workers` API calls verbose=True, - language="en" # Optionaly you can define a language, default=en + language="en", # Optionally you can define a language, default=en ) # sync @@ -59,6 +59,7 @@ You can also integrate the parser as the default PDF loader in `SimpleDirectoryR ```python import nest_asyncio + nest_asyncio.apply() from llama_parse import LlamaParse @@ -67,11 +68,13 @@ from llama_index.core import SimpleDirectoryReader parser = LlamaParse( api_key="llx-...", # can also be set in your env as LLAMA_CLOUD_API_KEY result_type="markdown", # "markdown" and "text" are available - verbose=True + verbose=True, ) file_extractor = {".pdf": parser} -documents = SimpleDirectoryReader("./data", file_extractor=file_extractor).load_data() +documents = SimpleDirectoryReader( + "./data", file_extractor=file_extractor +).load_data() ``` Full documentation for `SimpleDirectoryReader` can be found on the [LlamaIndex Documentation](https://docs.llamaindex.ai/en/stable/module_guides/loading/simpledirectoryreader.html). diff --git a/examples/agents/demo_simple_openai_agent.ipynb b/examples/agents/demo_simple_openai_agent.ipynb index 3a9e67d..9365899 100644 --- a/examples/agents/demo_simple_openai_agent.ipynb +++ b/examples/agents/demo_simple_openai_agent.ipynb @@ -27,7 +27,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -78,7 +78,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -91,7 +91,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -108,7 +108,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -129,9 +129,13 @@ ], "source": [ "import nest_asyncio\n", + "\n", "nest_asyncio.apply()\n", "\n", - "from llama_index.core.node_parser import MarkdownElementNodeParser, SentenceSplitter\n", + "from llama_index.core.node_parser import (\n", + " MarkdownElementNodeParser,\n", + " SentenceSplitter,\n", + ")\n", "\n", "# explicitly extract tables with the MarkdownElementNodeParser\n", "node_parser = MarkdownElementNodeParser(num_workers=8)\n", @@ -139,7 +143,9 @@ "nodes, objects = node_parser.get_nodes_and_objects(nodes)\n", "\n", "# Chain splitters to ensure chunk size requirements are met\n", - "nodes = SentenceSplitter(chunk_size=512, chunk_overlap=20).get_nodes_from_documents(nodes)" + "nodes = SentenceSplitter(chunk_size=512, chunk_overlap=20).get_nodes_from_documents(\n", + " nodes\n", + ")" ] }, { @@ -151,7 +157,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -163,7 +169,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -174,8 +180,7 @@ "tools = [\n", " QueryEngineTool(\n", " vector_index.as_query_engine(\n", - " similarity_top_k=8,\n", - " node_postprocessors=[ColbertRerank(top_n=3)]\n", + " similarity_top_k=8, node_postprocessors=[ColbertRerank(top_n=3)]\n", " ),\n", " metadata=ToolMetadata(\n", " name=\"search\",\n", @@ -191,15 +196,12 @@ " ),\n", "]\n", "\n", - "agent = OpenAIAgent.from_tools(\n", - " tools=tools, \n", - " verbose=True\n", - ")" + "agent = OpenAIAgent.from_tools(tools=tools, verbose=True)" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -222,7 +224,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -239,7 +241,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -261,7 +263,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -292,10 +294,8 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.12" - }, - "orig_nbformat": 4 + "pygments_lexer": "ipython3" + } }, "nbformat": 4, "nbformat_minor": 2 diff --git a/examples/demo_advanced.ipynb b/examples/demo_advanced.ipynb index 8501c8c..474bde4 100644 --- a/examples/demo_advanced.ipynb +++ b/examples/demo_advanced.ipynb @@ -45,15 +45,17 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# llama-parse is async-first, running the async code in a notebook requires the use of nest_asyncio\n", "import nest_asyncio\n", + "\n", "nest_asyncio.apply()\n", "\n", "import os\n", + "\n", "# API access to llama-cloud\n", "os.environ[\"LLAMA_CLOUD_API_KEY\"] = \"llx-\"\n", "\n", @@ -63,7 +65,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -72,11 +74,11 @@ "from llama_index.core import VectorStoreIndex\n", "from llama_index.core import Settings\n", "\n", - "embed_model=OpenAIEmbedding(model=\"text-embedding-3-small\")\n", + "embed_model = OpenAIEmbedding(model=\"text-embedding-3-small\")\n", "llm = OpenAI(model=\"gpt-3.5-turbo-0125\")\n", "\n", "Settings.llm = llm\n", - "Settings.embed_model = embed_model\n" + "Settings.embed_model = embed_model" ] }, { @@ -92,7 +94,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -106,12 +108,12 @@ "source": [ "from llama_parse import LlamaParse\n", "\n", - "documents = LlamaParse(result_type=\"markdown\").load_data('./uber_10q_march_2022.pdf')" + "documents = LlamaParse(result_type=\"markdown\").load_data(\"./uber_10q_march_2022.pdf\")" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -146,23 +148,25 @@ } ], "source": [ - "print(documents[0].text[:1000] + '...')" + "print(documents[0].text[:1000] + \"...\")" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from llama_index.core.node_parser import MarkdownElementNodeParser\n", "\n", - "node_parser = MarkdownElementNodeParser(llm=OpenAI(model=\"gpt-3.5-turbo-0125\"), num_workers=8)" + "node_parser = MarkdownElementNodeParser(\n", + " llm=OpenAI(model=\"gpt-3.5-turbo-0125\"), num_workers=8\n", + ")" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -187,7 +191,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -196,21 +200,23 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "recursive_index = VectorStoreIndex(nodes=base_nodes+objects)\n", + "recursive_index = VectorStoreIndex(nodes=base_nodes + objects)\n", "raw_index = VectorStoreIndex.from_documents(documents)" ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "from llama_index.postprocessor.flag_embedding_reranker import FlagEmbeddingReranker\n", + "from llama_index.postprocessor.flag_embedding_reranker import (\n", + " FlagEmbeddingReranker,\n", + ")\n", "\n", "reranker = FlagEmbeddingReranker(\n", " top_n=5,\n", @@ -218,17 +224,17 @@ ")\n", "\n", "recursive_query_engine = recursive_index.as_query_engine(\n", - " similarity_top_k=15, \n", - " node_postprocessors=[reranker], \n", - " verbose=True\n", + " similarity_top_k=15, node_postprocessors=[reranker], verbose=True\n", ")\n", "\n", - "raw_query_engine = raw_index.as_query_engine(similarity_top_k=15, node_postprocessors=[reranker])" + "raw_query_engine = raw_index.as_query_engine(\n", + " similarity_top_k=15, node_postprocessors=[reranker]\n", + ")" ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -260,7 +266,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -297,7 +303,7 @@ "\n", "response_2 = recursive_query_engine.query(query)\n", "print(\"\\n***********New LlamaParse+ Recursive Retriever Query Engine***********\")\n", - "print(response_2)\n" + "print(response_2)" ] }, { @@ -314,7 +320,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -374,7 +380,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -430,7 +436,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -504,8 +510,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.10" + "pygments_lexer": "ipython3" } }, "nbformat": 4, diff --git a/examples/demo_advanced_astradb.ipynb b/examples/demo_advanced_astradb.ipynb index d52cb9a..9298815 100644 --- a/examples/demo_advanced_astradb.ipynb +++ b/examples/demo_advanced_astradb.ipynb @@ -44,15 +44,17 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# llama-parse is async-first, running the async code in a notebook requires the use of nest_asyncio\n", "import nest_asyncio\n", + "\n", "nest_asyncio.apply()\n", "\n", "import os\n", + "\n", "# API access to llama-cloud\n", "os.environ[\"LLAMA_CLOUD_API_KEY\"] = \"llx-\"\n", "\n", @@ -66,7 +68,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -75,7 +77,7 @@ "from llama_index.core import VectorStoreIndex\n", "from llama_index.core import Settings\n", "\n", - "embed_model=OpenAIEmbedding(model=\"text-embedding-3-small\")\n", + "embed_model = OpenAIEmbedding(model=\"text-embedding-3-small\")\n", "llm = OpenAI(model=\"gpt-3.5-turbo-0125\")\n", "\n", "Settings.llm = llm\n", @@ -93,7 +95,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -107,12 +109,12 @@ "source": [ "from llama_parse import LlamaParse\n", "\n", - "documents = LlamaParse(result_type=\"markdown\").load_data('./uber_10q_march_2022.pdf')" + "documents = LlamaParse(result_type=\"markdown\").load_data(\"./uber_10q_march_2022.pdf\")" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -168,7 +170,7 @@ } ], "source": [ - "print(documents[0].text[:1000] + '...')" + "print(documents[0].text[:1000] + \"...\")" ] }, { @@ -180,29 +182,27 @@ }, { "cell_type": "code", - "execution_count": 8, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "from llama_index.vector_stores.astra_db import AstraDBVectorStore\n", "\n", - "# define two storage classes representing two collections (to compare advanced approach vs. baseline) \n", + "# define two storage classes representing two collections (to compare advanced approach vs. baseline)\n", "\n", "astra_db_store_advanced = AstraDBVectorStore(\n", " token=ASTRA_TOKEN,\n", " api_endpoint=ASTRA_API_ENDPOINT,\n", " namespace=ASTRA_NAMESPACE,\n", " collection_name=\"astra_v_table_llamaparse_advanced\",\n", - " embedding_dimension=1536\n", + " embedding_dimension=1536,\n", ")\n", "astra_db_store_base = AstraDBVectorStore(\n", " token=ASTRA_TOKEN,\n", " api_endpoint=ASTRA_API_ENDPOINT,\n", " namespace=ASTRA_NAMESPACE,\n", " collection_name=\"astra_v_table_llamaparse_base\",\n", - " embedding_dimension=1536\n", + " embedding_dimension=1536,\n", ")" ] }, @@ -219,13 +219,15 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from llama_index.core.node_parser import MarkdownElementNodeParser\n", "\n", - "node_parser = MarkdownElementNodeParser(llm=OpenAI(model=\"gpt-3.5-turbo-0125\"), num_workers=8)" + "node_parser = MarkdownElementNodeParser(\n", + " llm=OpenAI(model=\"gpt-3.5-turbo-0125\"), num_workers=8\n", + ")" ] }, { @@ -239,7 +241,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -248,17 +250,23 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from llama_index.core import StorageContext\n", "\n", - "storage_context_advanced = StorageContext.from_defaults(vector_store=astra_db_store_advanced)\n", + "storage_context_advanced = StorageContext.from_defaults(\n", + " vector_store=astra_db_store_advanced\n", + ")\n", "storage_context_base = StorageContext.from_defaults(vector_store=astra_db_store_base)\n", "\n", - "recursive_index = VectorStoreIndex(nodes=base_nodes+objects, storage_context=storage_context_advanced)\n", - "raw_index = VectorStoreIndex.from_documents(documents, storage_context=storage_context_base)" + "recursive_index = VectorStoreIndex(\n", + " nodes=base_nodes + objects, storage_context=storage_context_advanced\n", + ")\n", + "raw_index = VectorStoreIndex.from_documents(\n", + " documents, storage_context=storage_context_base\n", + ")" ] }, { @@ -267,7 +275,9 @@ "metadata": {}, "outputs": [], "source": [ - "from llama_index.postprocessor.flag_embedding_reranker import FlagEmbeddingReranker\n", + "from llama_index.postprocessor.flag_embedding_reranker import (\n", + " FlagEmbeddingReranker,\n", + ")\n", "\n", "reranker = FlagEmbeddingReranker(\n", " top_n=5,\n", @@ -275,12 +285,12 @@ ")\n", "\n", "recursive_query_engine = recursive_index.as_query_engine(\n", - " similarity_top_k=15, \n", - " node_postprocessors=[reranker], \n", - " verbose=True\n", + " similarity_top_k=15, node_postprocessors=[reranker], verbose=True\n", ")\n", "\n", - "raw_query_engine = raw_index.as_query_engine(similarity_top_k=15, node_postprocessors=[reranker])" + "raw_query_engine = raw_index.as_query_engine(\n", + " similarity_top_k=15, node_postprocessors=[reranker]\n", + ")" ] }, { @@ -300,7 +310,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -341,7 +351,7 @@ "\n", "response_2 = recursive_query_engine.query(query)\n", "print(\"\\n***********New LlamaParse+ Recursive Retriever Query Engine***********\")\n", - "print(response_2)\n" + "print(response_2)" ] }, { @@ -358,7 +368,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -422,7 +432,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -478,7 +488,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -554,8 +564,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" + "pygments_lexer": "ipython3" } }, "nbformat": 4, diff --git a/examples/demo_api.ipynb b/examples/demo_api.ipynb index 355c9bc..38b5a4d 100644 --- a/examples/demo_api.ipynb +++ b/examples/demo_api.ipynb @@ -11,7 +11,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -38,7 +38,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -47,7 +47,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -88,7 +88,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -128,10 +128,8 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.5" - }, - "orig_nbformat": 4 + "pygments_lexer": "ipython3" + } }, "nbformat": 4, "nbformat_minor": 2 diff --git a/examples/demo_astradb.ipynb b/examples/demo_astradb.ipynb index 2428fd2..5c0107b 100644 --- a/examples/demo_astradb.ipynb +++ b/examples/demo_astradb.ipynb @@ -23,7 +23,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -40,7 +40,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -53,7 +53,9 @@ "llama_cloud_api_key = getpass(\"Enter your Llama Index Cloud API Key: \")\n", "api_endpoint = input(\"Enter your Astra DB API Endpoint: \")\n", "token = getpass(\"Enter your Astra DB Token: \")\n", - "namespace = input(\"Enter your Astra DB namespace (optional, must exist on Astra): \") or None\n", + "namespace = (\n", + " input(\"Enter your Astra DB namespace (optional, must exist on Astra): \") or None\n", + ")\n", "openai_api_key = getpass(\"Enter your OpenAI API Key: \")\n", "\n", "os.environ[\"LLAMA_CLOUD_API_KEY\"] = llama_cloud_api_key\n", @@ -62,7 +64,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -81,7 +83,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -94,7 +96,7 @@ ], "source": [ "# Grab a PDF from Arxiv for indexing\n", - "import requests \n", + "import requests\n", "\n", "# The URL of the file you want to download\n", "url = \"https://arxiv.org/pdf/1706.03762.pdf\"\n", @@ -116,7 +118,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -135,7 +137,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -144,7 +146,7 @@ "'rmer - model architecture.\\nThe Transformer follows this overall architecture using stacked self-attention and point-wise, fully\\nconnected layers for both the encoder and decoder, shown in the left and right halves of Figure 1,\\nrespectively.\\n3.1 Encoder and Decoder Stacks\\nEncoder: The encoder is composed of a stack of N = 6 identical layers. Each layer has two\\nsub-layers. The first is a multi-head self-attention mechanism, and the second is a simple, position-\\nwise fully connected feed-forward network. We employ a residual connection [11] around each of\\nthe two sub-layers, followed by layer normalization [1]. That is, the output of each sub-layer is\\nLayerNorm(x + Sublayer(x)), where Sublayer(x) is the function implemented by the sub-layer\\nitself. To facilitate these residual connections, all sub-layers in the model, as well as the embedding\\nlayers, produce outputs of dimension dmodel = 512.\\nDecoder: The decoder is also composed of a stack of N = 6 identical layers. In addition '" ] }, - "execution_count": 6, + "execution_count": null, "metadata": {}, "output_type": "execute_result" } @@ -163,7 +165,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -174,16 +176,14 @@ " api_endpoint=api_endpoint,\n", " namespace=namespace,\n", " collection_name=\"astra_v_table_llamaparse\",\n", - " embedding_dimension=1536\n", + " embedding_dimension=1536,\n", ")" ] }, { "cell_type": "code", - "execution_count": 8, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "from llama_index.core.node_parser import SimpleNodeParser\n", @@ -195,7 +195,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -220,7 +220,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -229,7 +229,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -252,7 +252,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -261,7 +261,7 @@ "'We used beam search as described in the previous section, but no\\ncheckpoint averaging. We present these results in Table 3.\\nIn Table 3 rows (A), we vary the number of attention heads and the attention key and value dimensions,\\nkeeping the amount of computation constant, as described in Section 3.2.2. While single-head\\nattention is 0.9 BLEU worse than the best setting, quality also drops off with too many heads.\\nIn Table 3 rows (B), we observe that reducing the attention key size dk hurts model quality. This\\nsuggests that determining compatibility is not easy and that a more sophisticated compatibility\\nfunction than dot product may be beneficial. We further observe in rows (C) and (D) that, as expected,\\nbigger models are better, and dropout is very helpful in avoiding over-fitting. In row (E) we replace our\\nsinusoidal positional encoding with learned positional embeddings [9], and observe nearly identical\\nresults to the base model.\\n6.3 English Constituency Parsing\\nTo evaluate if the Transformer can generalize to other tasks we performed experiments on English\\nconstituency parsing. This task presents specific challenges: the output is subject to strong structural\\nconstraints and is significantly longer than the input. Furthermore, RNN sequence-to-sequence\\nmodels have not been able to attain state-of-the-art results in small-data regimes [37].\\nWe trained a 4-layer transformer with dmodel = 1024 on the Wall Street Journal (WSJ) portion of the\\nPenn Treebank [25], about 40K training sentences. We also trained it in a semi-supervised setting,\\nusing the larger high-confidence and BerkleyParser corpora from with approximately 17M sentences\\n[37]. We used a vocabulary of 16K tokens for the WSJ only setting and a vocabulary of 32K tokens\\nfor the semi-supervised setting.\\nWe performed only a small number of experiments to select the dropout, both attention and residual\\n(section 5.4), learning rates and beam size on the Section 22 development set, all other parameters\\nremained unchanged from the English-to-German base translation model. During inference, we\\n 9\\n---\\nTable 4: The Transformer generalizes well to English constituency parsing (Results are on Section 23\\nof WSJ)\\n Parser Training WSJ 23 F1\\n Vinyals & Kaiser el al. (2014) [37] WSJ only, discriminative 88.3\\n Petrov et al. (2006) [29] WSJ only, discriminative 90.4\\n Zhu et al. (2013) [40] WSJ only, discriminative 90.4\\n Dyer et al. (2016) [8] WSJ only, discriminative 91.7\\n Transformer (4 layers) WSJ only, discriminative 91.3\\n Zhu et al. (2013) [40] semi-supervised 91.3\\n Huang & Harper (2009) [14] semi-supervised 91.3\\n McClosky et al. (2006) [26] semi-supervised 92.1\\n Vinyals & Kaiser el al. (2014) [37] semi-supervised 92.1\\n Transformer (4 layers) semi-supervised 92.7\\n Luong et al. (2015) [23] multi-task 93.0\\n Dyer et al. (2016) [8] generative 93.3\\nincreased the maximum output length to input length + 300. We used a beam size of 21 and α = 0.3\\nfor both WSJ only and the semi-supervised setting.\\nOur results in Table 4 show that despite the lack of task-specific tuning our model performs sur-\\nprisingly well, yielding better results than all previously reported models with the exception of the\\nRecurrent Neural Network Grammar [8].\\nIn contrast to RNN sequence-to-sequence models [37], the Transformer outperforms the Berkeley-\\nParser [29] even when training only on the WSJ training set of 40K sentences.\\n7 Conclusion\\nIn this work, we presented the Transformer, the first sequence transduction model based entirely on\\nattention, replacing the recurrent layers most commonly used in encoder-decoder architectures with\\nmulti-headed self-attention.\\nFor translation tasks, the Transformer can be trained significantly faster than architectures based\\non recurrent or convolutional layers.'" ] }, - "execution_count": 12, + "execution_count": null, "metadata": {}, "output_type": "execute_result" } @@ -287,8 +287,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.6" + "pygments_lexer": "ipython3" } }, "nbformat": 4, diff --git a/examples/demo_basic.ipynb b/examples/demo_basic.ipynb index f08a038..fc3144a 100644 --- a/examples/demo_basic.ipynb +++ b/examples/demo_basic.ipynb @@ -18,7 +18,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -45,7 +45,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -55,12 +55,13 @@ "nest_asyncio.apply()\n", "\n", "import os\n", + "\n", "os.environ[\"LLAMA_CLOUD_API_KEY\"] = \"llx-...\"" ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -79,7 +80,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -107,7 +108,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -126,7 +127,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -157,13 +158,6 @@ "source": [ "print(documents[0].text[20000:21000] + \"...\")" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { @@ -181,8 +175,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.10" + "pygments_lexer": "ipython3" } }, "nbformat": 4, diff --git a/examples/demo_insurance.ipynb b/examples/demo_insurance.ipynb index 1af6896..56c824f 100644 --- a/examples/demo_insurance.ipynb +++ b/examples/demo_insurance.ipynb @@ -39,9 +39,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "!wget \"https://policyholder.gov.in/documents/37343/931203/NBHTGBP22011V012223.pdf/c392bcc1-f6a8-cadd-ab84-495b3273d2c3?version=1.0&t=1669350459879&download=true\" -O \"./policy.pdf\"" @@ -56,24 +54,24 @@ }, { "cell_type": "code", - "execution_count": 1, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "# llama-parse is async-first, running the sync code in a notebook requires the use of nest_asyncio\n", "import nest_asyncio\n", + "\n", "nest_asyncio.apply()" ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import os\n", + "\n", "os.environ[\"LLAMA_CLOUD_API_KEY\"] = \"llx-...\"\n", "os.environ[\"OPENAI_API_KEY\"] = \"sk-...\"" ] @@ -81,9 +79,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from llama_index.llms.openai import OpenAI\n", @@ -92,7 +88,7 @@ "from llama_index.core import Settings\n", "\n", "# for the purpose of this example, we will use the small model embedding and gpt3.5\n", - "embed_model=OpenAIEmbedding(model=\"text-embedding-3-small\")\n", + "embed_model = OpenAIEmbedding(model=\"text-embedding-3-small\")\n", "llm = OpenAI(model=\"gpt-3.5-turbo-0125\")\n", "\n", "Settings.llm = llm" @@ -107,10 +103,8 @@ }, { "cell_type": "code", - "execution_count": 3, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -129,10 +123,8 @@ }, { "cell_type": "code", - "execution_count": 4, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -168,23 +160,21 @@ }, { "cell_type": "code", - "execution_count": 5, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "from llama_index.core.node_parser import MarkdownElementNodeParser\n", "\n", - "node_parser = MarkdownElementNodeParser(llm=OpenAI(model=\"gpt-3.5-turbo-0125\"), num_workers=8)" + "node_parser = MarkdownElementNodeParser(\n", + " llm=OpenAI(model=\"gpt-3.5-turbo-0125\"), num_workers=8\n", + ")" ] }, { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "nodes = node_parser.get_nodes_from_documents(documents)" @@ -192,23 +182,19 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "base_nodes, objects = node_parser.get_nodes_and_objects(nodes)\n", "\n", - "recursive_index = VectorStoreIndex(nodes=base_nodes+objects)" + "recursive_index = VectorStoreIndex(nodes=base_nodes + objects)" ] }, { "cell_type": "code", - "execution_count": 8, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "query_engine = recursive_index.as_query_engine(similarity_top_k=25)" @@ -223,10 +209,8 @@ }, { "cell_type": "code", - "execution_count": 9, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -252,10 +236,8 @@ }, { "cell_type": "code", - "execution_count": 10, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -267,7 +249,9 @@ } ], "source": [ - "documents_with_instruction = LlamaParse(result_type=\"markdown\", parsing_instruction=\"\"\"\n", + "documents_with_instruction = LlamaParse(\n", + " result_type=\"markdown\",\n", + " parsing_instruction=\"\"\"\n", "This document is an insurance policy.\n", "When a benefits/coverage/exlusion is describe in the document ammend to it add a text in the follwing benefits string format (where coverage could be an exclusion).\n", "\n", @@ -275,7 +259,8 @@ " \n", "If the document contain a benefits TABLE that describe coverage amounts, do not ouput it as a table, but instead as a list of benefits string.\n", " \n", - "\"\"\").load_data(\"./policy.pdf\")" + "\"\"\",\n", + ").load_data(\"./policy.pdf\")" ] }, { @@ -287,10 +272,8 @@ }, { "cell_type": "code", - "execution_count": 11, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -404,17 +387,24 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ - "node_parser_instruction = MarkdownElementNodeParser(llm=OpenAI(model=\"gpt-3.5-turbo-0125\"), num_workers=8)\n", + "node_parser_instruction = MarkdownElementNodeParser(\n", + " llm=OpenAI(model=\"gpt-3.5-turbo-0125\"), num_workers=8\n", + ")\n", "nodes_instruction = node_parser.get_nodes_from_documents(documents_with_instruction)\n", - "base_nodes_instruction, objects_instruction = node_parser_instruction.get_nodes_and_objects(nodes_instruction)\n", + "(\n", + " base_nodes_instruction,\n", + " objects_instruction,\n", + ") = node_parser_instruction.get_nodes_and_objects(nodes_instruction)\n", "\n", - "recursive_index_instruction = VectorStoreIndex(nodes=base_nodes_instruction+objects_instruction)\n", - "query_engine_instruction = recursive_index_instruction.as_query_engine(similarity_top_k=25)" + "recursive_index_instruction = VectorStoreIndex(\n", + " nodes=base_nodes_instruction + objects_instruction\n", + ")\n", + "query_engine_instruction = recursive_index_instruction.as_query_engine(\n", + " similarity_top_k=25\n", + ")" ] }, { @@ -428,10 +418,8 @@ }, { "cell_type": "code", - "execution_count": 22, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -453,7 +441,7 @@ "\n", "print(\"With instructions:\")\n", "response_1_i = query_engine_instruction.query(query_1)\n", - "print(response_1_i)\n" + "print(response_1_i)" ] }, { @@ -465,10 +453,8 @@ }, { "cell_type": "code", - "execution_count": 16, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -495,10 +481,8 @@ }, { "cell_type": "code", - "execution_count": 18, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -522,13 +506,6 @@ "response_3_i = query_engine_instruction.query(query_3)\n", "print(response_3_i)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { @@ -546,8 +523,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" + "pygments_lexer": "ipython3" } }, "nbformat": 4, diff --git a/examples/demo_json.ipynb b/examples/demo_json.ipynb index c1065dd..729c1ae 100644 --- a/examples/demo_json.ipynb +++ b/examples/demo_json.ipynb @@ -40,18 +40,18 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "0879301c-ff91-4431-941a-6c0ef7cd8fe2", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "# llama-parse is async-first, running the async code in a notebook requires the use of nest_asyncio\n", "import nest_asyncio\n", + "\n", "nest_asyncio.apply()\n", "\n", "import os\n", + "\n", "# API access to llama-cloud\n", "os.environ[\"LLAMA_CLOUD_API_KEY\"] = \"llx-\"\n", "\n", @@ -63,9 +63,7 @@ "cell_type": "code", "execution_count": null, "id": "391e2d95-5569-4d73-9f16-5b59d7326f8d", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from llama_index.llms.anthropic import Anthropic\n", @@ -75,11 +73,9 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "700f48e8-8b52-41f3-90f9-144d5fdd5c52", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from llama_index.core import Settings\n", @@ -102,9 +98,7 @@ "cell_type": "code", "execution_count": null, "id": "c39d408f-e885-4940-85c7-b09ca3bc7cb7", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "!wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/docs/examples/data/10q/uber_10q_march_2022.pdf' -O './uber_10q_march_2022.pdf'" @@ -122,11 +116,9 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "9c9cd670-8229-4ad6-99a9-845bd82b7ec1", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -146,11 +138,9 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "b26d21d1-05b5-4f49-b937-c13106a84015", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from llama_index.core.schema import TextNode\n", @@ -160,23 +150,16 @@ "def get_text_nodes(json_list: List[dict]):\n", " text_nodes = []\n", " for idx, page in enumerate(json_list):\n", - " text_node = TextNode(\n", - " text=page[\"text\"],\n", - " metadata={\n", - " \"page\": page[\"page\"]\n", - " }\n", - " )\n", + " text_node = TextNode(text=page[\"text\"], metadata={\"page\": page[\"page\"]})\n", " text_nodes.append(text_node)\n", " return text_nodes" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "364a3276-d2db-4aee-9bc6-617ffd726d25", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "text_nodes = get_text_nodes(json_list)" @@ -194,7 +177,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "36012145-5521-4ddb-a53e-df9ebd1ca8dd", "metadata": {}, "outputs": [ @@ -226,10 +209,7 @@ " prompt=\"Describe the images as an alternative text\",\n", " image_documents=[image_doc],\n", " )\n", - " text_node = TextNode(\n", - " text=str(response),\n", - " metadata={\"path\": image_dict[\"path\"]}\n", - " )\n", + " text_node = TextNode(text=str(response), metadata={\"path\": image_dict[\"path\"]})\n", " img_text_nodes.append(text_node)\n", " return img_text_nodes" ] @@ -238,9 +218,7 @@ "cell_type": "code", "execution_count": null, "id": "38f25045-6102-4920-9cd0-42b0ae6c872f", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "image_text_nodes = get_image_text_nodes(json_objs)" @@ -248,11 +226,9 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": null, "id": "4683c97a-da06-408a-9fe9-7e3c0aceb77d", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [ { "data": { @@ -260,7 +236,7 @@ "'The image shows a bar graph titled \"Monthly Active Platform Consumers (in millions)\". The graph displays data from Q2 2020 to Q1 2022 over 8 quarters. The number of monthly active platform consumers starts at 55 million in Q2 2020 and steadily increases each quarter, reaching 115 million by Q1 2022. The graph illustrates consistent quarter-over-quarter growth in this metric over the nearly 2 year time period shown.'" ] }, - "execution_count": 60, + "execution_count": null, "metadata": {}, "output_type": "execute_result" } @@ -281,7 +257,7 @@ }, { "cell_type": "code", - "execution_count": 68, + "execution_count": null, "id": "939aec6c-064a-4319-b2dc-70cc4a304c06", "metadata": {}, "outputs": [], @@ -293,7 +269,7 @@ }, { "cell_type": "code", - "execution_count": 69, + "execution_count": null, "id": "529340d5-9319-4cdf-8ee1-bbd01ed00226", "metadata": {}, "outputs": [], @@ -303,11 +279,9 @@ }, { "cell_type": "code", - "execution_count": 71, + "execution_count": null, "id": "81d7ff30-5a87-44da-880d-4b1f41434d90", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -320,18 +294,18 @@ } ], "source": [ - "# ask question over image! \n", - "response = query_engine.query(\"What does the bar graph titled 'Monthly Active Platform Consumers' show?\") \n", - "print(str(response)) " + "# ask question over image!\n", + "response = query_engine.query(\n", + " \"What does the bar graph titled 'Monthly Active Platform Consumers' show?\"\n", + ")\n", + "print(str(response))" ] }, { "cell_type": "code", - "execution_count": 72, + "execution_count": null, "id": "c4f14ad8-6bfd-49d9-b3d5-7215cf0e4ac1", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -360,25 +334,17 @@ } ], "source": [ - "# ask question over text! \n", - "response = query_engine.query(\"What are the main risk factors for Uber?\") \n", - "print(str(response)) " + "# ask question over text!\n", + "response = query_engine.query(\"What are the main risk factors for Uber?\")\n", + "print(str(response))" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "82ea880b-a0c7-410c-94c7-8fb3ac96c30c", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { "kernelspec": { - "display_name": "llama_parse", + "display_name": "llama-parse-aNC435Vv-py3.10", "language": "python", - "name": "llama_parse" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -389,8 +355,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" + "pygments_lexer": "ipython3" } }, "nbformat": 4, diff --git a/examples/demo_json_parsing.ipynb b/examples/demo_json_parsing.ipynb index 39ccb5c..4757a7b 100644 --- a/examples/demo_json_parsing.ipynb +++ b/examples/demo_json_parsing.ipynb @@ -42,18 +42,18 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "0879301c-ff91-4431-941a-6c0ef7cd8fe2", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "# llama-parse is async-first, running the async code in a notebook requires the use of nest_asyncio\n", "import nest_asyncio\n", + "\n", "nest_asyncio.apply()\n", "\n", "import os\n", + "\n", "# API access to llama-cloud\n", "os.environ[\"LLAMA_CLOUD_API_KEY\"] = \"llx-\"\n", "\n", @@ -73,9 +73,7 @@ "cell_type": "code", "execution_count": null, "id": "391e2d95-5569-4d73-9f16-5b59d7326f8d", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "!wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/docs/examples/data/10q/uber_10q_march_2022.pdf' -O './uber_10q_march_2022.pdf'" @@ -91,7 +89,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "33f2a06e", "metadata": {}, "outputs": [ @@ -129,7 +127,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": null, "id": "e1e9e955", "metadata": {}, "outputs": [ @@ -157,7 +155,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "3108ba82", "metadata": {}, "outputs": [ @@ -188,7 +186,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "07669c6a", "metadata": {}, "outputs": [ @@ -220,10 +218,12 @@ "metadata": {}, "outputs": [], "source": [ - "from llama_index.core.node_parser import LlamaParseJsonNodeParser \n", + "from llama_index.core.node_parser import LlamaParseJsonNodeParser\n", "from llama_index.llms.openai import OpenAI\n", "\n", - "node_parser = LlamaParseJsonNodeParser(llm=OpenAI(model=\"gpt-3.5-turbo\"), num_workers=16, include_metadata=True)\n", + "node_parser = LlamaParseJsonNodeParser(\n", + " llm=OpenAI(model=\"gpt-3.5-turbo\"), num_workers=16, include_metadata=True\n", + ")\n", "nodes = node_parser.get_nodes_from_documents(documents)\n", "base_nodes, objects = node_parser.get_nodes_and_objects(nodes)" ] @@ -238,7 +238,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "id": "71b75550", "metadata": {}, "outputs": [ @@ -260,17 +260,18 @@ "from llama_index.core import VectorStoreIndex\n", "\n", "\n", - "recursive_index = VectorStoreIndex(nodes=base_nodes+objects)\n", + "recursive_index = VectorStoreIndex(nodes=base_nodes + objects)\n", "recursive_query_engine = recursive_index.as_query_engine(\n", - " similarity_top_k=5, \n", - " verbose=True\n", + " similarity_top_k=5, verbose=True\n", ")\n", - "res = recursive_query_engine.query(\"what is UBER Short-term insurance reserves reported in 2022\")\n" + "res = recursive_query_engine.query(\n", + " \"what is UBER Short-term insurance reserves reported in 2022\"\n", + ")" ] }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "id": "965fdd22", "metadata": {}, "outputs": [ @@ -301,7 +302,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "id": "0f917e20", "metadata": {}, "outputs": [ @@ -322,12 +323,14 @@ } ], "source": [ - "res = recursive_query_engine.query(\"what is Comprehensive income (loss) attributable to Uber reported in 2021\")\n" + "res = recursive_query_engine.query(\n", + " \"what is Comprehensive income (loss) attributable to Uber reported in 2021\"\n", + ")" ] }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "id": "85b5c025", "metadata": {}, "outputs": [ @@ -372,8 +375,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.6" + "pygments_lexer": "ipython3" } }, "nbformat": 4, diff --git a/examples/demo_languages.ipynb b/examples/demo_languages.ipynb index b525b34..191649a 100644 --- a/examples/demo_languages.ipynb +++ b/examples/demo_languages.ipynb @@ -26,11 +26,9 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "87322210-c21c-43d6-b459-2e8a828ac576", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "# llama-parse is async-first, running the sync code in a notebook requires the use of nest_asyncio\n", @@ -39,6 +37,7 @@ "nest_asyncio.apply()\n", "\n", "import os\n", + "\n", "# os.environ[\"LLAMA_CLOUD_API_KEY\"] = \"llx-...\"" ] }, @@ -56,9 +55,7 @@ "cell_type": "code", "execution_count": null, "id": "e81e0a08-3a99-42e6-adcc-00bb4ce1c3d4", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "!wget \"https://www.dropbox.com/scl/fi/fxg17log5ydwoflhxmgrb/treasury_report.pdf?rlkey=mdintk0o2uuzkple26vc4v6fd&dl=1\" -O treasury_report.pdf" @@ -66,11 +63,9 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "ecfc578c-3c7f-4ec1-aa06-51565c28632b", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -84,20 +79,15 @@ "source": [ "from llama_parse import LlamaParse\n", "\n", - "parser = LlamaParse(\n", - " result_type=\"text\",\n", - " language=\"fr\"\n", - ")\n", + "parser = LlamaParse(result_type=\"text\", language=\"fr\")\n", "documents = parser.load_data(\"./treasury_report.pdf\")" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "0c37db27-3496-4a59-918b-701c9ad7706d", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -209,11 +199,9 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "id": "ac332ea3-cfff-4216-b292-62410a26c336", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -248,11 +236,9 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "id": "45235b17-08f0-48f1-92aa-06711225860b", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -266,20 +252,15 @@ "source": [ "from llama_parse import LlamaParse\n", "\n", - "parser = LlamaParse(\n", - " result_type=\"text\",\n", - " language=\"ch_sim\"\n", - ")\n", + "parser = LlamaParse(result_type=\"text\", language=\"ch_sim\")\n", "documents = parser.load_data(\"./chinese_pdf.pdf\")" ] }, { "cell_type": "code", - "execution_count": 28, + "execution_count": null, "id": "f0d546cc-6549-4cf5-8b37-0896f4e8d43d", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -401,9 +382,7 @@ "cell_type": "code", "execution_count": null, "id": "640f0679-7f7e-4b0a-a46d-b099ae382fe2", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "# download another copy with a different name to avoid hitting pdf cache\n", @@ -412,11 +391,9 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": null, "id": "bfcacf90-ca67-4bfd-b023-be0af2cb18c5", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -429,10 +406,7 @@ "source": [ "from llama_parse import LlamaParse\n", "\n", - "base_parser = LlamaParse(\n", - " result_type=\"text\",\n", - " language=\"en\"\n", - ")\n", + "base_parser = LlamaParse(result_type=\"text\", language=\"en\")\n", "base_documents = parser.load_data(\"./chinese_pdf2.pdf\")" ] }, @@ -440,21 +414,11 @@ "cell_type": "code", "execution_count": null, "id": "b264ed4e-647a-4f51-9f79-fdf82b76762a", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "print(base_documents[0].get_content()[1000:10000])" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d9f02762-bb97-4e0e-8268-ccc00612a974", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { @@ -472,8 +436,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" + "pygments_lexer": "ipython3" } }, "nbformat": 4, diff --git a/examples/demo_mongodb.ipynb b/examples/demo_mongodb.ipynb index 370275b..fdcd0b9 100644 --- a/examples/demo_mongodb.ipynb +++ b/examples/demo_mongodb.ipynb @@ -1,434 +1,367 @@ { - "cells": [ - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "id": "W6SX9VAnximx" - }, - "source": [ - "# LlamaParse With MongoDB\n", - "\n", - "\"Open\n", - "\n", - "In this notebook, we provide a straightforward example of using LlamaParse with MongoDB Atlas VectorSearch.\n", - "\n", - "We illustrate the process of using llama-parse to parse a PDF document, then index the document with a MongoDB vector store, and subsequently perform basic queries against this store.\n", - "\n", - "This notebook is structured similarly to quick start guides, aiming to introduce users to utilizing llama-parse in conjunction with a MongoDB Atlas VectorSearch." - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "rUJKhWDHxr_k" - }, - "source": [ - "### Installation" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "U6ZkIeBnxfRb" - }, - "outputs": [], - "source": [ - "!pip install llama-index llama-parse pip install llama-index-vector-stores-mongodb llama-index-llms-openai" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "wh1eeFJe1gkY" - }, - "source": [ - "### Setup API Keys" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "id": "I5slpdnyxwIB" - }, - "outputs": [], - "source": [ - "import os\n", - "os.environ[\"LLAMA_CLOUD_API_KEY\"] = '' # Get it from https://cloud.llamaindex.ai/api-key\n", - "os.environ['OPENAI_API_KEY'] = '' # Get it from https://platform.openai.com/api-keys" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "id": "es2mz_OVyQw9" - }, - "outputs": [], - "source": [ - "# llama-parse is async-first, running the sync code in a notebook requires the use of nest_asyncio\n", - "import nest_asyncio\n", - "\n", - "nest_asyncio.apply()\n", - "\n", - "import requests\n", - "import pymongo\n", - "\n", - "from llama_index.vector_stores.mongodb import MongoDBAtlasVectorSearch\n", - "from llama_parse import LlamaParse\n", - "from llama_index.embeddings.openai import OpenAIEmbedding\n", - "from llama_index.core import VectorStoreIndex, StorageContext\n", - "from llama_index.core.node_parser import SimpleNodeParser" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "Ou3bVdHQ10X5" - }, - "source": [ - "### Download Document\n", - "\n", - "We will use `Attention is all you need` paper." - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "YO9lAk6bybV3", - "outputId": "5cee588a-bec5-482e-e8ef-fbb78e8a5967" - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Download complete.\n" - ] - } - ], - "source": [ - "# The URL of the file you want to download\n", - "url = \"https://arxiv.org/pdf/1706.03762.pdf\"\n", - "# The local path where you want to save the file\n", - "file_path = \"./attention.pdf\"\n", - "\n", - "# Perform the HTTP request\n", - "response = requests.get(url)\n", - "\n", - "# Check if the request was successful\n", - "if response.status_code == 200:\n", - " # Open the file in binary write mode and save the content\n", - " with open(file_path, \"wb\") as file:\n", - " file.write(response.content)\n", - " print(\"Download complete.\")\n", - "else:\n", - " print(\"Error downloading the file.\")" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "1NtR7PGo13Hh" - }, - "source": [ - "### Parse the document using `LlamaParse`." - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "reeJsblfyeSd", - "outputId": "bb569e9f-fe31-47b9-a059-d7da369b3f94" - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Started parsing the file under job_id 09a49745-9f21-4190-9de8-27e4e1a4bdf5\n" - ] - } - ], - "source": [ - "documents = LlamaParse(result_type=\"text\").load_data(file_path)" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "-NIXtCBwyiPp", - "outputId": "ad4b3cec-2c23-4858-81f0-994ae2c96b8f" - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "rmer - model architecture.\n", - "The Transformer follows this overall architecture using stacked self-attention and point-wise, fully\n", - "connected layers for both the encoder and decoder, shown in the left and right halves of Figure 1,\n", - "respectively.\n", - "3.1 Encoder and Decoder Stacks\n", - "Encoder: The encoder is composed of a stack of N = 6 identical layers. Each layer has two\n", - "sub-layers. The first is a multi-head self-attention mechanism, and the second is a simple, position-\n", - "wise fully connected feed-forward network. We employ a residual connection [11] around each of\n", - "the two sub-layers, followed by layer normalization [1]. That is, the output of each sub-layer is\n", - "LayerNorm(x + Sublayer(x)), where Sublayer(x) is the function implemented by the sub-layer\n", - "itself. To facilitate these residual connections, all sub-layers in the model, as well as the embedding\n", - "layers, produce outputs of dimension dmodel = 512.\n", - "Decoder: The decoder is also composed of a stack of N = 6 identical layers. In addition \n" - ] - } - ], - "source": [ - "# Take a quick look at some of the parsed text from the document:\n", - "print(documents[0].get_content()[10000:11000])" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "id": "wP9I5dhB1-w1" - }, - "source": [ - "### Create `MongoDBAtlasVectorSearch`." - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "id": "-4Ek0oK-yp3L" - }, - "outputs": [], - "source": [ - "mongo_uri = os.environ[\"MONGO_URI\"]\n", - "\n", - "mongodb_client = pymongo.MongoClient(mongo_uri)\n", - "mongodb_vector_store = MongoDBAtlasVectorSearch(mongodb_client)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "GYiVwFok2DNf" - }, - "source": [ - "### Create nodes." - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "id": "aqdF6ZonytHF" - }, - "outputs": [], - "source": [ - "node_parser = SimpleNodeParser()\n", - "\n", - "nodes = node_parser.get_nodes_from_documents(documents)" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "U5fMoGrA2GSH" - }, - "source": [ - "### Create Index and Query Engine." - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "id": "gQUieIrAywSC" - }, - "outputs": [], - "source": [ - "storage_context = StorageContext.from_defaults(vector_store=mongodb_vector_store)\n", - "\n", - "index = VectorStoreIndex(\n", - " nodes=nodes,\n", - " storage_context=storage_context,\n", - " embed_model=OpenAIEmbedding(),\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "id": "snkZZss-zKDb" - }, - "outputs": [], - "source": [ - "query_engine = index.as_query_engine(similarity_top_k=2)" - ] - }, + "cells": [ + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# LlamaParse With MongoDB\n", + "\n", + "\"Open\n", + "\n", + "In this notebook, we provide a straightforward example of using LlamaParse with MongoDB Atlas VectorSearch.\n", + "\n", + "We illustrate the process of using llama-parse to parse a PDF document, then index the document with a MongoDB vector store, and subsequently perform basic queries against this store.\n", + "\n", + "This notebook is structured similarly to quick start guides, aiming to introduce users to utilizing llama-parse in conjunction with a MongoDB Atlas VectorSearch." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Installation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!pip install llama-index llama-parse pip install llama-index-vector-stores-mongodb llama-index-llms-openai" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Setup API Keys" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "\n", + "os.environ[\n", + " \"LLAMA_CLOUD_API_KEY\"\n", + "] = \"\" # Get it from https://cloud.llamaindex.ai/api-key\n", + "os.environ[\"OPENAI_API_KEY\"] = \"\" # Get it from https://platform.openai.com/api-keys" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# llama-parse is async-first, running the sync code in a notebook requires the use of nest_asyncio\n", + "import nest_asyncio\n", + "\n", + "nest_asyncio.apply()\n", + "\n", + "import requests\n", + "import pymongo\n", + "\n", + "from llama_index.vector_stores.mongodb import MongoDBAtlasVectorSearch\n", + "from llama_parse import LlamaParse\n", + "from llama_index.embeddings.openai import OpenAIEmbedding\n", + "from llama_index.core import VectorStoreIndex, StorageContext\n", + "from llama_index.core.node_parser import SimpleNodeParser" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Download Document\n", + "\n", + "We will use `Attention is all you need` paper." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ { - "cell_type": "markdown", - "metadata": { - "id": "rTKT34XO2LYk" - }, - "source": [ - "### Test Query" - ] - }, + "name": "stdout", + "output_type": "stream", + "text": [ + "Download complete.\n" + ] + } + ], + "source": [ + "# The URL of the file you want to download\n", + "url = \"https://arxiv.org/pdf/1706.03762.pdf\"\n", + "# The local path where you want to save the file\n", + "file_path = \"./attention.pdf\"\n", + "\n", + "# Perform the HTTP request\n", + "response = requests.get(url)\n", + "\n", + "# Check if the request was successful\n", + "if response.status_code == 200:\n", + " # Open the file in binary write mode and save the content\n", + " with open(file_path, \"wb\") as file:\n", + " file.write(response.content)\n", + " print(\"Download complete.\")\n", + "else:\n", + " print(\"Error downloading the file.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Parse the document using `LlamaParse`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "r66ciuPkzNv1", - "outputId": "919218e3-0884-4992-802c-ab1c4622ec4b" - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "***********New LlamaParse+ Basic Query Engine***********\n", - "The BLEU score on the WMT 2014 English-to-German translation task is 28.4.\n" - ] - } - ], - "source": [ - "query = \"What is BLEU score on the WMT 2014 English-to-German translation task?\"\n", - "\n", - "response = query_engine.query(query)\n", - "print(\"\\n***********New LlamaParse+ Basic Query Engine***********\")\n", - "print(response)" - ] - }, + "name": "stdout", + "output_type": "stream", + "text": [ + "Started parsing the file under job_id 09a49745-9f21-4190-9de8-27e4e1a4bdf5\n" + ] + } + ], + "source": [ + "documents = LlamaParse(result_type=\"text\").load_data(file_path)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ { - "cell_type": "code", - "execution_count": 11, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "K7RsivpwzQBo", - "outputId": "9bcbf62e-250c-46db-f247-e1f293c09bbe" - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "We varied the learning\n", - "rate over the course of training, according to the formula:\n", - " lrate = d−0.5 (3)\n", - " model · min(step_num−0.5, step_num · warmup_steps−1.5)\n", - "This corresponds to increasing the learning rate linearly for the first warmup_steps training steps,\n", - "and decreasing it thereafter proportionally to the inverse square root of the step number. We used\n", - "warmup_steps = 4000.\n", - "5.4 Regularization\n", - "We employ three types of regularization during training:\n", - " 7\n", - "---\n", - "Table 2: The Transformer achieves better BLEU scores than previous state-of-the-art models on the\n", - "English-to-German and English-to-French newstest2014 tests at a fraction of the training cost.\n", - " Model BLEU Training Cost (FLOPs)\n", - " EN-DE EN-FR EN-DE EN-FR\n", - " ByteNet [18] 23.75\n", - " Deep-Att + PosUnk [39] 39.2 1.0 · 1020\n", - " GNMT + RL [38] 24.6 39.92 2.3 · 1019 1.4 · 1020\n", - " ConvS2S [9] 25.16 40.46 9.6 · 1018 1.5 · 1020\n", - " MoE [32] 26.03 40.56 2.0 · 1019 1.2 · 1020\n", - " Deep-Att + PosUnk Ensemble [39] 40.4 8.0 · 1020\n", - " GNMT + RL Ensemble [38] 26.30 41.16 1.8 · 1020 1.1 · 1021\n", - " ConvS2S Ensemble [9] 26.36 41.29 7.7 · 1019 1.2 · 1021\n", - " Transformer (base model) 27.3 38.1 3.3 · 1018\n", - " Transformer (big) 28.4 41.8 2.3 · 1019\n", - "Residual Dropout We apply dropout [33] to the output of each sub-layer, before it is added to the\n", - "sub-layer input and normalized. In addition, we apply dropout to the sums of the embeddings and the\n", - "positional encodings in both the encoder and decoder stacks. For the base model, we use a rate of\n", - "Pdrop = 0.1.\n", - "Label Smoothing During training, we employed label smoothing of value ϵls = 0.1 [36]. This\n", - "hurts perplexity, as the model learns to be more unsure, but improves accuracy and BLEU score.\n", - "6 Results\n", - "6.1 Machine Translation\n", - "On the WMT 2014 English-to-German translation task, the big transformer model (Transformer (big)\n", - "in Table 2) outperforms the best previously reported models (including ensembles) by more than 2.0\n", - "BLEU, establishing a new state-of-the-art BLEU score of 28.4. The configuration of this model is\n", - "listed in the bottom line of Table 3. Training took 3.5 days on 8 P100 GPUs. Even our base model\n", - "surpasses all previously published models and ensembles, at a fraction of the training cost of any of\n", - "the competitive models.\n", - "On the WMT 2014 English-to-French translation task, our big model achieves a BLEU score of 41.0,\n", - "outperforming all of the previously published single models, at less than 1/4 the training cost of the\n", - "previous state-of-the-art model. The Transformer (big) model trained for English-to-French used\n", - "dropout rate Pdrop = 0.1, instead of 0.3.\n", - "For the base models, we used a single model obtained by averaging the last 5 checkpoints, which\n", - "were written at 10-minute intervals. For the big models, we averaged the last 20 checkpoints. We\n", - "used beam search with a beam size of 4 and length penalty α = 0.6 [38]. These hyperparameters\n", - "were chosen after experimentation on the development set. We set the maximum output length during\n", - "inference to input length + 50, but terminate early when possible [38].\n", - "Table 2 summarizes our results and compares our translation quality and training costs to other model\n", - "architectures from the literature.\n" - ] - } - ], - "source": [ - "# Take a look at one of the source nodes from the response\n", - "print(response.source_nodes[0].get_content())" - ] - }, + "name": "stdout", + "output_type": "stream", + "text": [ + "rmer - model architecture.\n", + "The Transformer follows this overall architecture using stacked self-attention and point-wise, fully\n", + "connected layers for both the encoder and decoder, shown in the left and right halves of Figure 1,\n", + "respectively.\n", + "3.1 Encoder and Decoder Stacks\n", + "Encoder: The encoder is composed of a stack of N = 6 identical layers. Each layer has two\n", + "sub-layers. The first is a multi-head self-attention mechanism, and the second is a simple, position-\n", + "wise fully connected feed-forward network. We employ a residual connection [11] around each of\n", + "the two sub-layers, followed by layer normalization [1]. That is, the output of each sub-layer is\n", + "LayerNorm(x + Sublayer(x)), where Sublayer(x) is the function implemented by the sub-layer\n", + "itself. To facilitate these residual connections, all sub-layers in the model, as well as the embedding\n", + "layers, produce outputs of dimension dmodel = 512.\n", + "Decoder: The decoder is also composed of a stack of N = 6 identical layers. In addition \n" + ] + } + ], + "source": [ + "# Take a quick look at some of the parsed text from the document:\n", + "print(documents[0].get_content()[10000:11000])" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Create `MongoDBAtlasVectorSearch`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "mongo_uri = os.environ[\"MONGO_URI\"]\n", + "\n", + "mongodb_client = pymongo.MongoClient(mongo_uri)\n", + "mongodb_vector_store = MongoDBAtlasVectorSearch(mongodb_client)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Create nodes." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "node_parser = SimpleNodeParser()\n", + "\n", + "nodes = node_parser.get_nodes_from_documents(documents)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Create Index and Query Engine." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "storage_context = StorageContext.from_defaults(vector_store=mongodb_vector_store)\n", + "\n", + "index = VectorStoreIndex(\n", + " nodes=nodes,\n", + " storage_context=storage_context,\n", + " embed_model=OpenAIEmbedding(),\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "query_engine = index.as_query_engine(similarity_top_k=2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Test Query" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "***********New LlamaParse+ Basic Query Engine***********\n", + "The BLEU score on the WMT 2014 English-to-German translation task is 28.4.\n" + ] } - ], - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "display_name": "anthropic_env", - "language": "python", - "name": "anthropic_env" - }, - "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.11.3" - }, - "vscode": { - "interpreter": { - "hash": "b0fa6594d8f4cbf19f97940f81e996739fb7646882a419484c72d19e05852a7e" - } + ], + "source": [ + "query = \"What is BLEU score on the WMT 2014 English-to-German translation task?\"\n", + "\n", + "response = query_engine.query(query)\n", + "print(\"\\n***********New LlamaParse+ Basic Query Engine***********\")\n", + "print(response)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "We varied the learning\n", + "rate over the course of training, according to the formula:\n", + " lrate = d−0.5 (3)\n", + " model · min(step_num−0.5, step_num · warmup_steps−1.5)\n", + "This corresponds to increasing the learning rate linearly for the first warmup_steps training steps,\n", + "and decreasing it thereafter proportionally to the inverse square root of the step number. We used\n", + "warmup_steps = 4000.\n", + "5.4 Regularization\n", + "We employ three types of regularization during training:\n", + " 7\n", + "---\n", + "Table 2: The Transformer achieves better BLEU scores than previous state-of-the-art models on the\n", + "English-to-German and English-to-French newstest2014 tests at a fraction of the training cost.\n", + " Model BLEU Training Cost (FLOPs)\n", + " EN-DE EN-FR EN-DE EN-FR\n", + " ByteNet [18] 23.75\n", + " Deep-Att + PosUnk [39] 39.2 1.0 · 1020\n", + " GNMT + RL [38] 24.6 39.92 2.3 · 1019 1.4 · 1020\n", + " ConvS2S [9] 25.16 40.46 9.6 · 1018 1.5 · 1020\n", + " MoE [32] 26.03 40.56 2.0 · 1019 1.2 · 1020\n", + " Deep-Att + PosUnk Ensemble [39] 40.4 8.0 · 1020\n", + " GNMT + RL Ensemble [38] 26.30 41.16 1.8 · 1020 1.1 · 1021\n", + " ConvS2S Ensemble [9] 26.36 41.29 7.7 · 1019 1.2 · 1021\n", + " Transformer (base model) 27.3 38.1 3.3 · 1018\n", + " Transformer (big) 28.4 41.8 2.3 · 1019\n", + "Residual Dropout We apply dropout [33] to the output of each sub-layer, before it is added to the\n", + "sub-layer input and normalized. In addition, we apply dropout to the sums of the embeddings and the\n", + "positional encodings in both the encoder and decoder stacks. For the base model, we use a rate of\n", + "Pdrop = 0.1.\n", + "Label Smoothing During training, we employed label smoothing of value ϵls = 0.1 [36]. This\n", + "hurts perplexity, as the model learns to be more unsure, but improves accuracy and BLEU score.\n", + "6 Results\n", + "6.1 Machine Translation\n", + "On the WMT 2014 English-to-German translation task, the big transformer model (Transformer (big)\n", + "in Table 2) outperforms the best previously reported models (including ensembles) by more than 2.0\n", + "BLEU, establishing a new state-of-the-art BLEU score of 28.4. The configuration of this model is\n", + "listed in the bottom line of Table 3. Training took 3.5 days on 8 P100 GPUs. Even our base model\n", + "surpasses all previously published models and ensembles, at a fraction of the training cost of any of\n", + "the competitive models.\n", + "On the WMT 2014 English-to-French translation task, our big model achieves a BLEU score of 41.0,\n", + "outperforming all of the previously published single models, at less than 1/4 the training cost of the\n", + "previous state-of-the-art model. The Transformer (big) model trained for English-to-French used\n", + "dropout rate Pdrop = 0.1, instead of 0.3.\n", + "For the base models, we used a single model obtained by averaging the last 5 checkpoints, which\n", + "were written at 10-minute intervals. For the big models, we averaged the last 20 checkpoints. We\n", + "used beam search with a beam size of 4 and length penalty α = 0.6 [38]. These hyperparameters\n", + "were chosen after experimentation on the development set. We set the maximum output length during\n", + "inference to input length + 50, but terminate early when possible [38].\n", + "Table 2 summarizes our results and compares our translation quality and training costs to other model\n", + "architectures from the literature.\n" + ] } + ], + "source": [ + "# Take a look at one of the source nodes from the response\n", + "print(response.source_nodes[0].get_content())" + ] + } + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "anthropic_env", + "language": "python", + "name": "anthropic_env" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3" }, - "nbformat": 4, - "nbformat_minor": 0 + "vscode": { + "interpreter": { + "hash": "b0fa6594d8f4cbf19f97940f81e996739fb7646882a419484c72d19e05852a7e" + } + } + }, + "nbformat": 4, + "nbformat_minor": 0 } diff --git a/examples/demo_parsing_instructions.ipynb b/examples/demo_parsing_instructions.ipynb index 75c60eb..5e487a0 100644 --- a/examples/demo_parsing_instructions.ipynb +++ b/examples/demo_parsing_instructions.ipynb @@ -1,615 +1,544 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - } + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# LlamaParse - Parsing comic books with parsing intructions\n", + "Parsing intructions allow you to instruct our parsing model the same way you would instruct an LLM!\n", + "\n", + "They can be useful to help the parser get better results on complex document layouts, to extract data in a specific format, or to transform the document in other ways.\n", + "\n", + "Using Parsing Instruction you will get better results out of LlamaParse on complicated documents, and also be able to simplify your application code." + ] }, - "cells": [ - { - "cell_type": "markdown", - "source": [ - "# LlamaParse - Parsing comic books with parsing intructions\n", - "Parsing intructions allow you to instruct our parsing model the same way you would instruct an LLM!\n", - "\n", - "They can be useful to help the parser get better results on complex document layouts, to extract data in a specific format, or to transform the document in other ways.\n", - "\n", - "Using Parsing Instruction you will get better results out of LlamaParse on complicated documents, and also be able to simplify your application code." - ], - "metadata": { - "id": "eld1dKaN7P8B" - } - }, - { - "cell_type": "markdown", - "source": [ - "## Installation\n", - "\n", - "Parsing instructions are part of the llamaParse API. They can be accessed by directly specifying the parsing_instruction parameter in the API or by using the LlamaParse python module (which we will use for this tutorial).\n", - "\n", - "To install llama-parse, just get it from PIP:" - ], - "metadata": { - "id": "goB1sV8zu_Xl" - } - }, - { - "cell_type": "code", - "source": [ - "!pip install llama-parse" - ], - "metadata": { - "id": "7Y3_BwQLu-qK", - "colab": { - "base_uri": "https://localhost:8080/" - }, - "outputId": "652f8957-ae7a-48e3-86ae-2e9e885c4e1e" - }, - "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Collecting llama-parse\n", - " Downloading llama_parse-0.3.8-py3-none-any.whl (6.7 kB)\n", - "Collecting llama-index-core>=0.10.7 (from llama-parse)\n", - " Downloading llama_index_core-0.10.19-py3-none-any.whl (15.3 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m15.3/15.3 MB\u001b[0m \u001b[31m31.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: PyYAML>=6.0.1 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (6.0.1)\n", - "Requirement already satisfied: SQLAlchemy[asyncio]>=1.4.49 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (2.0.28)\n", - "Requirement already satisfied: aiohttp<4.0.0,>=3.8.6 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (3.9.3)\n", - "Collecting dataclasses-json (from llama-index-core>=0.10.7->llama-parse)\n", - " Downloading dataclasses_json-0.6.4-py3-none-any.whl (28 kB)\n", - "Collecting deprecated>=1.2.9.3 (from llama-index-core>=0.10.7->llama-parse)\n", - " Downloading Deprecated-1.2.14-py2.py3-none-any.whl (9.6 kB)\n", - "Collecting dirtyjson<2.0.0,>=1.0.8 (from llama-index-core>=0.10.7->llama-parse)\n", - " Downloading dirtyjson-1.0.8-py3-none-any.whl (25 kB)\n", - "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (2023.6.0)\n", - "Collecting httpx (from llama-index-core>=0.10.7->llama-parse)\n", - " Downloading httpx-0.27.0-py3-none-any.whl (75 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.6/75.6 kB\u001b[0m \u001b[31m6.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting llamaindex-py-client<0.2.0,>=0.1.13 (from llama-index-core>=0.10.7->llama-parse)\n", - " Downloading llamaindex_py_client-0.1.13-py3-none-any.whl (107 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m108.0/108.0 kB\u001b[0m \u001b[31m10.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: nest-asyncio<2.0.0,>=1.5.8 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (1.6.0)\n", - "Requirement already satisfied: networkx>=3.0 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (3.2.1)\n", - "Requirement already satisfied: nltk<4.0.0,>=3.8.1 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (3.8.1)\n", - "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (1.25.2)\n", - "Collecting openai>=1.1.0 (from llama-index-core>=0.10.7->llama-parse)\n", - " Downloading openai-1.13.3-py3-none-any.whl (227 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m227.4/227.4 kB\u001b[0m \u001b[31m16.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (1.5.3)\n", - "Requirement already satisfied: pillow>=9.0.0 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (9.4.0)\n", - "Requirement already satisfied: requests>=2.31.0 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (2.31.0)\n", - "Requirement already satisfied: tenacity<9.0.0,>=8.2.0 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (8.2.3)\n", - "Collecting tiktoken>=0.3.3 (from llama-index-core>=0.10.7->llama-parse)\n", - " Downloading tiktoken-0.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.8/1.8 MB\u001b[0m \u001b[31m43.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: tqdm<5.0.0,>=4.66.1 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (4.66.2)\n", - "Requirement already satisfied: typing-extensions>=4.5.0 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (4.10.0)\n", - "Collecting typing-inspect>=0.8.0 (from llama-index-core>=0.10.7->llama-parse)\n", - " Downloading typing_inspect-0.9.0-py3-none-any.whl (8.8 kB)\n", - "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core>=0.10.7->llama-parse) (1.3.1)\n", - "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core>=0.10.7->llama-parse) (23.2.0)\n", - "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core>=0.10.7->llama-parse) (1.4.1)\n", - "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core>=0.10.7->llama-parse) (6.0.5)\n", - "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core>=0.10.7->llama-parse) (1.9.4)\n", - "Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core>=0.10.7->llama-parse) (4.0.3)\n", - "Requirement already satisfied: wrapt<2,>=1.10 in /usr/local/lib/python3.10/dist-packages (from deprecated>=1.2.9.3->llama-index-core>=0.10.7->llama-parse) (1.14.1)\n", - "Requirement already satisfied: pydantic>=1.10 in /usr/local/lib/python3.10/dist-packages (from llamaindex-py-client<0.2.0,>=0.1.13->llama-index-core>=0.10.7->llama-parse) (2.6.3)\n", - "Requirement already satisfied: anyio in /usr/local/lib/python3.10/dist-packages (from httpx->llama-index-core>=0.10.7->llama-parse) (3.7.1)\n", - "Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx->llama-index-core>=0.10.7->llama-parse) (2024.2.2)\n", - "Collecting httpcore==1.* (from httpx->llama-index-core>=0.10.7->llama-parse)\n", - " Downloading httpcore-1.0.4-py3-none-any.whl (77 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.8/77.8 kB\u001b[0m \u001b[31m8.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: idna in /usr/local/lib/python3.10/dist-packages (from httpx->llama-index-core>=0.10.7->llama-parse) (3.6)\n", - "Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx->llama-index-core>=0.10.7->llama-parse) (1.3.1)\n", - "Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx->llama-index-core>=0.10.7->llama-parse)\n", - " Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: click in /usr/local/lib/python3.10/dist-packages (from nltk<4.0.0,>=3.8.1->llama-index-core>=0.10.7->llama-parse) (8.1.7)\n", - "Requirement already satisfied: joblib in /usr/local/lib/python3.10/dist-packages (from nltk<4.0.0,>=3.8.1->llama-index-core>=0.10.7->llama-parse) (1.3.2)\n", - "Requirement already satisfied: regex>=2021.8.3 in /usr/local/lib/python3.10/dist-packages (from nltk<4.0.0,>=3.8.1->llama-index-core>=0.10.7->llama-parse) (2023.12.25)\n", - "Requirement already satisfied: distro<2,>=1.7.0 in /usr/lib/python3/dist-packages (from openai>=1.1.0->llama-index-core>=0.10.7->llama-parse) (1.7.0)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.31.0->llama-index-core>=0.10.7->llama-parse) (3.3.2)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.31.0->llama-index-core>=0.10.7->llama-parse) (2.0.7)\n", - "Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.10/dist-packages (from SQLAlchemy[asyncio]>=1.4.49->llama-index-core>=0.10.7->llama-parse) (3.0.3)\n", - "Collecting mypy-extensions>=0.3.0 (from typing-inspect>=0.8.0->llama-index-core>=0.10.7->llama-parse)\n", - " Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)\n", - "Collecting marshmallow<4.0.0,>=3.18.0 (from dataclasses-json->llama-index-core>=0.10.7->llama-parse)\n", - " Downloading marshmallow-3.21.1-py3-none-any.whl (49 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.4/49.4 kB\u001b[0m \u001b[31m4.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas->llama-index-core>=0.10.7->llama-parse) (2.8.2)\n", - "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->llama-index-core>=0.10.7->llama-parse) (2023.4)\n", - "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio->httpx->llama-index-core>=0.10.7->llama-parse) (1.2.0)\n", - "Requirement already satisfied: packaging>=17.0 in /usr/local/lib/python3.10/dist-packages (from marshmallow<4.0.0,>=3.18.0->dataclasses-json->llama-index-core>=0.10.7->llama-parse) (23.2)\n", - "Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic>=1.10->llamaindex-py-client<0.2.0,>=0.1.13->llama-index-core>=0.10.7->llama-parse) (0.6.0)\n", - "Requirement already satisfied: pydantic-core==2.16.3 in /usr/local/lib/python3.10/dist-packages (from pydantic>=1.10->llamaindex-py-client<0.2.0,>=0.1.13->llama-index-core>=0.10.7->llama-parse) (2.16.3)\n", - "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.1->pandas->llama-index-core>=0.10.7->llama-parse) (1.16.0)\n", - "Installing collected packages: dirtyjson, mypy-extensions, marshmallow, h11, deprecated, typing-inspect, tiktoken, httpcore, httpx, dataclasses-json, openai, llamaindex-py-client, llama-index-core, llama-parse\n", - "Successfully installed dataclasses-json-0.6.4 deprecated-1.2.14 dirtyjson-1.0.8 h11-0.14.0 httpcore-1.0.4 httpx-0.27.0 llama-index-core-0.10.19 llama-parse-0.3.8 llamaindex-py-client-0.1.13 marshmallow-3.21.1 mypy-extensions-1.0.0 openai-1.13.3 tiktoken-0.6.0 typing-inspect-0.9.0\n" - ] - } - ] - }, - { - "cell_type": "markdown", - "source": [ - "## API key\n", - "\n", - "The use of LlamaParse requires an API key which you can get here: https://cloud.llamaindex.ai/parse" - ], - "metadata": { - "id": "i-Rg2D_Rvf2i" - } - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "af6i2P1vuU-U" - }, - "outputs": [], - "source": [ - "import os\n", - "os.environ[\"LLAMA_CLOUD_API_KEY\"] = \"llx-...\"" - ] - }, - { - "cell_type": "markdown", - "source": [ - "## Async (Notebook only)\n", - "llama-parse is async-first, so running the code in a notebook requires the use of nest_asyncio\n" - ], - "metadata": { - "id": "p8Eq-aX-wAEo" - } - }, - { - "cell_type": "code", - "source": [ - "import nest_asyncio\n", - "\n", - "nest_asyncio.apply()" - ], - "metadata": { - "id": "4OB0BkTqv_0l" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "## Import the package" - ], - "metadata": { - "id": "dz927ecMyYo_" - } - }, - { - "cell_type": "code", - "source": [ - "from llama_parse import LlamaParse" - ], - "metadata": { - "id": "nSW-6sEwyXwx" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "## Using llamaparse for getting better results (on Manga!)\n", - "\n", - "Sometimes the layout of a page is unusual and you will get sub-optimal reading order results with LlamaParse. For example, when parsing manga you expect the reading order to be right to left even if the content is in English!" - ], - "metadata": { - "id": "l_D4YsAHwUSk" - } - }, - { - "cell_type": "markdown", - "source": [ - "Let's download an extract of a great manga \"The manga guide to calculus\", by Hiroyuki Kojima (https://www.amazon.com/Manga-Guide-Calculus-Hiroyuki-Kojima/dp/1593271948)\n", - "\n" - ], - "metadata": { - "id": "SV4K2RivxzJG" - } - }, - { - "cell_type": "code", - "source": [ - "! wget \"https://drive.usercontent.google.com/uc?id=1tZJhcpepLRdQFJFCFX50QIqLyLgqzZsY&export=download\" -O ./manga.pdf" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "d3qeuiyawT0U", - "outputId": "e6da0635-dea2-4f2b-ec03-d8db99a75e17" - }, - "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "--2024-03-13 13:57:19-- https://drive.usercontent.google.com/uc?id=1tZJhcpepLRdQFJFCFX50QIqLyLgqzZsY&export=download\n", - "Resolving drive.usercontent.google.com (drive.usercontent.google.com)... 173.194.211.132, 2607:f8b0:400c:c10::84\n", - "Connecting to drive.usercontent.google.com (drive.usercontent.google.com)|173.194.211.132|:443... connected.\n", - "HTTP request sent, awaiting response... 303 See Other\n", - "Location: https://drive.usercontent.google.com/download?id=1tZJhcpepLRdQFJFCFX50QIqLyLgqzZsY&export=download [following]\n", - "--2024-03-13 13:57:19-- https://drive.usercontent.google.com/download?id=1tZJhcpepLRdQFJFCFX50QIqLyLgqzZsY&export=download\n", - "Reusing existing connection to drive.usercontent.google.com:443.\n", - "HTTP request sent, awaiting response... 200 OK\n", - "Length: 3041634 (2.9M) [application/octet-stream]\n", - "Saving to: ‘./manga.pdf’\n", - "\n", - "./manga.pdf 100%[===================>] 2.90M --.-KB/s in 0.04s \n", - "\n", - "2024-03-13 13:57:20 (78.6 MB/s) - ‘./manga.pdf’ saved [3041634/3041634]\n", - "\n" - ] - } - ] - }, - { - "cell_type": "markdown", - "source": [ - "### Without parsing instructions\n", - "For the sake of comparison, let's first parse without any instructions." - ], - "metadata": { - "id": "Gbr8RiHEyF3-" - } - }, - { - "cell_type": "code", - "source": [ - "vanilaParsing = LlamaParse(result_type=\"markdown\").load_data(\"./manga.pdf\")" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "3jKnXCuAyQ9_", - "outputId": "8ab58d56-8c51-44de-8d34-0d94b1bb440f" - }, - "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Started parsing the file under job_id 25bf4202-78d8-4705-88cf-c616ae7c82af\n" - ] - } - ] - }, - { - "cell_type": "markdown", - "source": [ - "As you can see below, LlamaParse is not doing a great job here. It is interpreting the grid of comic panels as a table, and trying to fit the dialogue into a table. It's very hard to follow." - ], - "metadata": { - "id": "p4GVOdWzzvYg" - } - }, - { - "cell_type": "code", - "source": [ - "print(vanilaParsing[0].text[100:1000])" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "ZMhWfKrzzhgQ", - "outputId": "5426c0cc-7e62-4836-9877-87258e1f0b6f" - }, - "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "\n", - "The Asagake Times Sanda-Cho Distributor\n", - "\n", - "A newspaper distributor? do I have the wrong map?\n", - "\n", - "You’re looking It’s next for the Sanda-cho door. branch office? Everybody mistakes us for the office because we are larger. What Is a Function? 3\n", - "---\n", - "## Calculating the Derivative of a Constant, Linear, or Quadratic Function\n", - "\n", - "|1.|Let’s find the derivative of constant function f(x) = α. The differential coefficient of f(x) at x = a is|\n", - "|---|---|\n", - "| |lim ε→0 (f(a + ε) - f(a)) / ε = lim ε→0 (α - α) = lim ε→0 0 = 0|\n", - "| |Thus, the derivative of f(x) is f′(x) = 0. This makes sense, since our function is constant—the rate of change is 0.|\n", - "\n", - "Note: The differential coefficient of f(x) at x = a is often simply called the derivative of f(x) at x = a, or just f′(a).\n", - "\n", - "|2.|Let’s calculate the derivative of linear function f(x) = αx + β. The derivative of f(x) at x = α is|\n", - "|---|---|\n", - "| |lim ε→0 (f(α + ε) - f(a)) = \n" - ] - } - ] - }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Installation\n", + "\n", + "Parsing instructions are part of the llamaParse API. They can be accessed by directly specifying the parsing_instruction parameter in the API or by using the LlamaParse python module (which we will use for this tutorial).\n", + "\n", + "To install llama-parse, just get it from PIP:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ { - "cell_type": "markdown", - "source": [ - "### Using parsing instructions\n", - "Let's try to parse the manga with custom instructions:\n", - "\n", - "\"The provided document is a manga comic book. Most pages do NOT have title. It does not contain tables. Try to reconstruct the dialogue happening in a cohesive way.\"\n", - "\n", - "To do so just pass the parsing instruction as a parameter to LlamaParse:" - ], - "metadata": { - "id": "sUq6znUryiu0" - } - }, + "name": "stdout", + "output_type": "stream", + "text": [ + "Collecting llama-parse\n", + " Downloading llama_parse-0.3.8-py3-none-any.whl (6.7 kB)\n", + "Collecting llama-index-core>=0.10.7 (from llama-parse)\n", + " Downloading llama_index_core-0.10.19-py3-none-any.whl (15.3 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m15.3/15.3 MB\u001b[0m \u001b[31m31.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: PyYAML>=6.0.1 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (6.0.1)\n", + "Requirement already satisfied: SQLAlchemy[asyncio]>=1.4.49 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (2.0.28)\n", + "Requirement already satisfied: aiohttp<4.0.0,>=3.8.6 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (3.9.3)\n", + "Collecting dataclasses-json (from llama-index-core>=0.10.7->llama-parse)\n", + " Downloading dataclasses_json-0.6.4-py3-none-any.whl (28 kB)\n", + "Collecting deprecated>=1.2.9.3 (from llama-index-core>=0.10.7->llama-parse)\n", + " Downloading Deprecated-1.2.14-py2.py3-none-any.whl (9.6 kB)\n", + "Collecting dirtyjson<2.0.0,>=1.0.8 (from llama-index-core>=0.10.7->llama-parse)\n", + " Downloading dirtyjson-1.0.8-py3-none-any.whl (25 kB)\n", + "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (2023.6.0)\n", + "Collecting httpx (from llama-index-core>=0.10.7->llama-parse)\n", + " Downloading httpx-0.27.0-py3-none-any.whl (75 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.6/75.6 kB\u001b[0m \u001b[31m6.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting llamaindex-py-client<0.2.0,>=0.1.13 (from llama-index-core>=0.10.7->llama-parse)\n", + " Downloading llamaindex_py_client-0.1.13-py3-none-any.whl (107 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m108.0/108.0 kB\u001b[0m \u001b[31m10.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: nest-asyncio<2.0.0,>=1.5.8 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (1.6.0)\n", + "Requirement already satisfied: networkx>=3.0 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (3.2.1)\n", + "Requirement already satisfied: nltk<4.0.0,>=3.8.1 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (3.8.1)\n", + "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (1.25.2)\n", + "Collecting openai>=1.1.0 (from llama-index-core>=0.10.7->llama-parse)\n", + " Downloading openai-1.13.3-py3-none-any.whl (227 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m227.4/227.4 kB\u001b[0m \u001b[31m16.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (1.5.3)\n", + "Requirement already satisfied: pillow>=9.0.0 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (9.4.0)\n", + "Requirement already satisfied: requests>=2.31.0 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (2.31.0)\n", + "Requirement already satisfied: tenacity<9.0.0,>=8.2.0 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (8.2.3)\n", + "Collecting tiktoken>=0.3.3 (from llama-index-core>=0.10.7->llama-parse)\n", + " Downloading tiktoken-0.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.8/1.8 MB\u001b[0m \u001b[31m43.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: tqdm<5.0.0,>=4.66.1 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (4.66.2)\n", + "Requirement already satisfied: typing-extensions>=4.5.0 in /usr/local/lib/python3.10/dist-packages (from llama-index-core>=0.10.7->llama-parse) (4.10.0)\n", + "Collecting typing-inspect>=0.8.0 (from llama-index-core>=0.10.7->llama-parse)\n", + " Downloading typing_inspect-0.9.0-py3-none-any.whl (8.8 kB)\n", + "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core>=0.10.7->llama-parse) (1.3.1)\n", + "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core>=0.10.7->llama-parse) (23.2.0)\n", + "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core>=0.10.7->llama-parse) (1.4.1)\n", + "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core>=0.10.7->llama-parse) (6.0.5)\n", + "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core>=0.10.7->llama-parse) (1.9.4)\n", + "Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.6->llama-index-core>=0.10.7->llama-parse) (4.0.3)\n", + "Requirement already satisfied: wrapt<2,>=1.10 in /usr/local/lib/python3.10/dist-packages (from deprecated>=1.2.9.3->llama-index-core>=0.10.7->llama-parse) (1.14.1)\n", + "Requirement already satisfied: pydantic>=1.10 in /usr/local/lib/python3.10/dist-packages (from llamaindex-py-client<0.2.0,>=0.1.13->llama-index-core>=0.10.7->llama-parse) (2.6.3)\n", + "Requirement already satisfied: anyio in /usr/local/lib/python3.10/dist-packages (from httpx->llama-index-core>=0.10.7->llama-parse) (3.7.1)\n", + "Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx->llama-index-core>=0.10.7->llama-parse) (2024.2.2)\n", + "Collecting httpcore==1.* (from httpx->llama-index-core>=0.10.7->llama-parse)\n", + " Downloading httpcore-1.0.4-py3-none-any.whl (77 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.8/77.8 kB\u001b[0m \u001b[31m8.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: idna in /usr/local/lib/python3.10/dist-packages (from httpx->llama-index-core>=0.10.7->llama-parse) (3.6)\n", + "Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx->llama-index-core>=0.10.7->llama-parse) (1.3.1)\n", + "Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx->llama-index-core>=0.10.7->llama-parse)\n", + " Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: click in /usr/local/lib/python3.10/dist-packages (from nltk<4.0.0,>=3.8.1->llama-index-core>=0.10.7->llama-parse) (8.1.7)\n", + "Requirement already satisfied: joblib in /usr/local/lib/python3.10/dist-packages (from nltk<4.0.0,>=3.8.1->llama-index-core>=0.10.7->llama-parse) (1.3.2)\n", + "Requirement already satisfied: regex>=2021.8.3 in /usr/local/lib/python3.10/dist-packages (from nltk<4.0.0,>=3.8.1->llama-index-core>=0.10.7->llama-parse) (2023.12.25)\n", + "Requirement already satisfied: distro<2,>=1.7.0 in /usr/lib/python3/dist-packages (from openai>=1.1.0->llama-index-core>=0.10.7->llama-parse) (1.7.0)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.31.0->llama-index-core>=0.10.7->llama-parse) (3.3.2)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.31.0->llama-index-core>=0.10.7->llama-parse) (2.0.7)\n", + "Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.10/dist-packages (from SQLAlchemy[asyncio]>=1.4.49->llama-index-core>=0.10.7->llama-parse) (3.0.3)\n", + "Collecting mypy-extensions>=0.3.0 (from typing-inspect>=0.8.0->llama-index-core>=0.10.7->llama-parse)\n", + " Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)\n", + "Collecting marshmallow<4.0.0,>=3.18.0 (from dataclasses-json->llama-index-core>=0.10.7->llama-parse)\n", + " Downloading marshmallow-3.21.1-py3-none-any.whl (49 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.4/49.4 kB\u001b[0m \u001b[31m4.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas->llama-index-core>=0.10.7->llama-parse) (2.8.2)\n", + "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->llama-index-core>=0.10.7->llama-parse) (2023.4)\n", + "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio->httpx->llama-index-core>=0.10.7->llama-parse) (1.2.0)\n", + "Requirement already satisfied: packaging>=17.0 in /usr/local/lib/python3.10/dist-packages (from marshmallow<4.0.0,>=3.18.0->dataclasses-json->llama-index-core>=0.10.7->llama-parse) (23.2)\n", + "Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic>=1.10->llamaindex-py-client<0.2.0,>=0.1.13->llama-index-core>=0.10.7->llama-parse) (0.6.0)\n", + "Requirement already satisfied: pydantic-core==2.16.3 in /usr/local/lib/python3.10/dist-packages (from pydantic>=1.10->llamaindex-py-client<0.2.0,>=0.1.13->llama-index-core>=0.10.7->llama-parse) (2.16.3)\n", + "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.1->pandas->llama-index-core>=0.10.7->llama-parse) (1.16.0)\n", + "Installing collected packages: dirtyjson, mypy-extensions, marshmallow, h11, deprecated, typing-inspect, tiktoken, httpcore, httpx, dataclasses-json, openai, llamaindex-py-client, llama-index-core, llama-parse\n", + "Successfully installed dataclasses-json-0.6.4 deprecated-1.2.14 dirtyjson-1.0.8 h11-0.14.0 httpcore-1.0.4 httpx-0.27.0 llama-index-core-0.10.19 llama-parse-0.3.8 llamaindex-py-client-0.1.13 marshmallow-3.21.1 mypy-extensions-1.0.0 openai-1.13.3 tiktoken-0.6.0 typing-inspect-0.9.0\n" + ] + } + ], + "source": [ + "!pip install llama-parse" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## API key\n", + "\n", + "The use of LlamaParse requires an API key which you can get here: https://cloud.llamaindex.ai/parse" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "\n", + "os.environ[\"LLAMA_CLOUD_API_KEY\"] = \"llx-...\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Async (Notebook only)\n", + "llama-parse is async-first, so running the code in a notebook requires the use of nest_asyncio\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import nest_asyncio\n", + "\n", + "nest_asyncio.apply()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Import the package" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from llama_parse import LlamaParse" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Using llamaparse for getting better results (on Manga!)\n", + "\n", + "Sometimes the layout of a page is unusual and you will get sub-optimal reading order results with LlamaParse. For example, when parsing manga you expect the reading order to be right to left even if the content is in English!" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's download an extract of a great manga \"The manga guide to calculus\", by Hiroyuki Kojima (https://www.amazon.com/Manga-Guide-Calculus-Hiroyuki-Kojima/dp/1593271948)\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ { - "cell_type": "code", - "source": [ - "parsingInstructionManga = \"\"\"The provided document is a manga comic book, most page do NOT have title.\n", - "It does not contain table.\n", - "Try to reconstruct the dialog happening in a cohesive way.\"\"\"\n", - "withInstructionParsing = LlamaParse(result_type=\"markdown\", parsing_instruction=parsingInstructionManga).load_data(\"./manga.pdf\")" - ], - "metadata": { - "id": "dEX7Mv9V0UvM", - "colab": { - "base_uri": "https://localhost:8080/" - }, - "outputId": "184b77b7-7e3a-4991-f2c9-eb9105a35a7b" - }, - "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Started parsing the file under job_id 88ab273e-b2a7-4f84-8e72-e9367cf6b114\n", - "." - ] - } - ] - }, + "name": "stdout", + "output_type": "stream", + "text": [ + "--2024-03-13 13:57:19-- https://drive.usercontent.google.com/uc?id=1tZJhcpepLRdQFJFCFX50QIqLyLgqzZsY&export=download\n", + "Resolving drive.usercontent.google.com (drive.usercontent.google.com)... 173.194.211.132, 2607:f8b0:400c:c10::84\n", + "Connecting to drive.usercontent.google.com (drive.usercontent.google.com)|173.194.211.132|:443... connected.\n", + "HTTP request sent, awaiting response... 303 See Other\n", + "Location: https://drive.usercontent.google.com/download?id=1tZJhcpepLRdQFJFCFX50QIqLyLgqzZsY&export=download [following]\n", + "--2024-03-13 13:57:19-- https://drive.usercontent.google.com/download?id=1tZJhcpepLRdQFJFCFX50QIqLyLgqzZsY&export=download\n", + "Reusing existing connection to drive.usercontent.google.com:443.\n", + "HTTP request sent, awaiting response... 200 OK\n", + "Length: 3041634 (2.9M) [application/octet-stream]\n", + "Saving to: ‘./manga.pdf’\n", + "\n", + "./manga.pdf 100%[===================>] 2.90M --.-KB/s in 0.04s \n", + "\n", + "2024-03-13 13:57:20 (78.6 MB/s) - ‘./manga.pdf’ saved [3041634/3041634]\n", + "\n" + ] + } + ], + "source": [ + "! wget \"https://drive.usercontent.google.com/uc?id=1tZJhcpepLRdQFJFCFX50QIqLyLgqzZsY&export=download\" -O ./manga.pdf" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Without parsing instructions\n", + "For the sake of comparison, let's first parse without any instructions." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ { - "cell_type": "markdown", - "source": [ - "Let's see how it compare with page 3! We encourage you to play with the target page and explore other pages. As you will see, the parsing instruction allowed LlamaParse to make sense of the document!\n", - "\n", - "\n", - "\n", - "\n", - "\n" - ], - "metadata": { - "id": "-UQcA-YW2kjd" - } - }, + "name": "stdout", + "output_type": "stream", + "text": [ + "Started parsing the file under job_id 25bf4202-78d8-4705-88cf-c616ae7c82af\n" + ] + } + ], + "source": [ + "vanilaParsing = LlamaParse(result_type=\"markdown\").load_data(\"./manga.pdf\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "As you can see below, LlamaParse is not doing a great job here. It is interpreting the grid of comic panels as a table, and trying to fit the dialogue into a table. It's very hard to follow." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ { - "cell_type": "code", - "source": [ - "target_page=1\n", - "print(vanilaParsing[0].text.split('\\n---\\n')[target_page])\n", - "print(\"\\n\\n------------------------------------------------------------\\n\\n\")\n", - "print(withInstructionParsing[0].text.split('\\n---\\n')[target_page])" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "0oPHXg0F0yAS", - "outputId": "38b729bc-b0b7-42f2-97e0-b4e9d7d459a1" - }, - "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "The Asagake Times Sanda-Cho Distributor\n", - "\n", - "A newspaper distributor? do I have the wrong map?\n", - "\n", - "You’re looking It’s next for the Sanda-cho door. branch office? Everybody mistakes us for the office because we are larger. What Is a Function? 3\n", - "\n", - "\n", - "------------------------------------------------------------\n", - "\n", - "\n", - "# The Asagake Times\n", - "\n", - "Sanda-Cho Distributor\n", - "\n", - "A newspaper distributor?\n", - "\n", - "Do I have the wrong map?\n", - "\n", - "You're looking for the Sanda-cho branch office?\n", - "\n", - "It's next door.\n", - "\n", - "Everybody mistakes us for the office because we are larger.\n", - "\n", - "What Is a Function? 3\n" - ] - } - ] - }, + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "The Asagake Times Sanda-Cho Distributor\n", + "\n", + "A newspaper distributor? do I have the wrong map?\n", + "\n", + "You’re looking It’s next for the Sanda-cho door. branch office? Everybody mistakes us for the office because we are larger. What Is a Function? 3\n", + "---\n", + "## Calculating the Derivative of a Constant, Linear, or Quadratic Function\n", + "\n", + "|1.|Let’s find the derivative of constant function f(x) = α. The differential coefficient of f(x) at x = a is|\n", + "|---|---|\n", + "| |lim ε→0 (f(a + ε) - f(a)) / ε = lim ε→0 (α - α) = lim ε→0 0 = 0|\n", + "| |Thus, the derivative of f(x) is f′(x) = 0. This makes sense, since our function is constant—the rate of change is 0.|\n", + "\n", + "Note: The differential coefficient of f(x) at x = a is often simply called the derivative of f(x) at x = a, or just f′(a).\n", + "\n", + "|2.|Let’s calculate the derivative of linear function f(x) = αx + β. The derivative of f(x) at x = α is|\n", + "|---|---|\n", + "| |lim ε→0 (f(α + ε) - f(a)) = \n" + ] + } + ], + "source": [ + "print(vanilaParsing[0].text[100:1000])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Using parsing instructions\n", + "Let's try to parse the manga with custom instructions:\n", + "\n", + "\"The provided document is a manga comic book. Most pages do NOT have title. It does not contain tables. Try to reconstruct the dialogue happening in a cohesive way.\"\n", + "\n", + "To do so just pass the parsing instruction as a parameter to LlamaParse:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ { - "cell_type": "markdown", - "source": [ - "### Math - doing more with parsing instuction!\n", - "\n", - "But this manga is about math and full of equations, why not ask the parser to output them in **LaTeX**?\n", - "\n", - "" - ], - "metadata": { - "id": "yU_jyYWI5fMH" - } - }, + "name": "stdout", + "output_type": "stream", + "text": [ + "Started parsing the file under job_id 88ab273e-b2a7-4f84-8e72-e9367cf6b114\n", + "." + ] + } + ], + "source": [ + "parsingInstructionManga = \"\"\"The provided document is a manga comic book, most page do NOT have title.\n", + "It does not contain table.\n", + "Try to reconstruct the dialog happening in a cohesive way.\"\"\"\n", + "withInstructionParsing = LlamaParse(\n", + " result_type=\"markdown\", parsing_instruction=parsingInstructionManga\n", + ").load_data(\"./manga.pdf\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's see how it compare with page 3! We encourage you to play with the target page and explore other pages. As you will see, the parsing instruction allowed LlamaParse to make sense of the document!\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ { - "cell_type": "code", - "source": [ - "parsingInstructionMangaLatex = \"\"\"The provided document is a manga comic book, most page do NOT have title.\n", - "It does not contain table. Do not output table.\n", - "Try to reconstruct the dialog happening in a cohesive way.\n", - "Output any math equation in LATEX markdown (between $$)\"\"\"\n", - "withLatex = LlamaParse(result_type=\"markdown\", parsing_instruction=parsingInstructionMangaLatex).load_data(\"./manga.pdf\")" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "FP_YdO2y5e5o", - "outputId": "45171cdd-298a-4f1f-e67d-6be3cb1a1156" - }, - "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Started parsing the file under job_id 3a055e64-d91e-484e-b9b0-99a2e637c08d\n", - "." - ] - } - ] - }, + "name": "stdout", + "output_type": "stream", + "text": [ + "The Asagake Times Sanda-Cho Distributor\n", + "\n", + "A newspaper distributor? do I have the wrong map?\n", + "\n", + "You’re looking It’s next for the Sanda-cho door. branch office? Everybody mistakes us for the office because we are larger. What Is a Function? 3\n", + "\n", + "\n", + "------------------------------------------------------------\n", + "\n", + "\n", + "# The Asagake Times\n", + "\n", + "Sanda-Cho Distributor\n", + "\n", + "A newspaper distributor?\n", + "\n", + "Do I have the wrong map?\n", + "\n", + "You're looking for the Sanda-cho branch office?\n", + "\n", + "It's next door.\n", + "\n", + "Everybody mistakes us for the office because we are larger.\n", + "\n", + "What Is a Function? 3\n" + ] + } + ], + "source": [ + "target_page = 1\n", + "print(vanilaParsing[0].text.split(\"\\n---\\n\")[target_page])\n", + "print(\"\\n\\n------------------------------------------------------------\\n\\n\")\n", + "print(withInstructionParsing[0].text.split(\"\\n---\\n\")[target_page])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Math - doing more with parsing instuction!\n", + "\n", + "But this manga is about math and full of equations, why not ask the parser to output them in **LaTeX**?\n", + "\n", + "" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ { - "cell_type": "code", - "source": [ - "target_page=2\n", - "print(\"\\n\\n[Without instruction]------------------------------------------------------------\\n\\n\")\n", - "print(vanilaParsing[0].text.split('\\n---\\n')[target_page])\n", - "print(\"\\n\\n[With instruction to output math in LATEX!]------------------------------------------------------------\\n\\n\")\n", - "print(withLatex[0].text.split('\\n---\\n')[target_page])\n" - ], - "metadata": { - "id": "TntdRRGp6Rui", - "colab": { - "base_uri": "https://localhost:8080/" - }, - "outputId": "e2e503fa-eb87-4f78-83d8-209fe7cebd9e" - }, - "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "\n", - "\n", - "[Without instruction]------------------------------------------------------------\n", - "\n", - "\n", - "## Calculating the Derivative of a Constant, Linear, or Quadratic Function\n", - "\n", - "|1.|Let’s find the derivative of constant function f(x) = α. The differential coefficient of f(x) at x = a is|\n", - "|---|---|\n", - "| |lim ε→0 (f(a + ε) - f(a)) / ε = lim ε→0 (α - α) = lim ε→0 0 = 0|\n", - "| |Thus, the derivative of f(x) is f′(x) = 0. This makes sense, since our function is constant—the rate of change is 0.|\n", - "\n", - "Note: The differential coefficient of f(x) at x = a is often simply called the derivative of f(x) at x = a, or just f′(a).\n", - "\n", - "|2.|Let’s calculate the derivative of linear function f(x) = αx + β. The derivative of f(x) at x = α is|\n", - "|---|---|\n", - "| |lim ε→0 (f(α + ε) - f(a)) = lim ε→0 (α(a + ε) + β - (αa + β)) = lim ε→0 α = α|\n", - "| |Thus, the derivative of f(x) is f′(x) = α, a constant value. This result should also be intuitive—linear functions have a constant rate of change by definition.|\n", - "\n", - "|3.|Let’s find the derivative of f(x) = x^2, which appeared in the story. The differential coefficient of f(x) at x = a is|\n", - "|---|---|\n", - "| |lim ε→0 ((a + ε)^2 - a^2) / ε = lim (a^2 + 2aε + ε^2 - a^2) / ε = lim (2aε + ε^2) = lim (2a + ε) = 2a|\n", - "| |Thus, the differential coefficient of f(x) at x = a is 2a, or f′(a) = 2a. Therefore, the derivative of f(x) is f′(x) = 2x.|\n", - "\n", - "## Summary\n", - "\n", - "- The calculation of a limit that appears in calculus is simply a formula calculating an error.\n", - "- A limit is used to obtain a derivative.\n", - "- The derivative is the slope of the tangent line at a given point.\n", - "- The derivative is nothing but the rate of change.\n", - "\n", - "## Chapter 1 Let’s Differentiate a Function!\n", - "\n", - "\n", - "[With instruction to output math in LATEX!]------------------------------------------------------------\n", - "\n", - "\n", - "# Derivative of Constant, Linear, or Quadratic Function\n", - "\n", - "## Calculating the Derivative of a Constant, Linear, or Quadratic Function\n", - "\n", - "1. Let’s find the derivative of constant function f(x) = α. The differential coefficient of f(x) at x = a is\n", - "\n", - "$$\n", - "\\begin{align*}\n", - "&\\lim_{{\\varepsilon \\to 0}} \\left( \\frac{f(a + \\varepsilon) - f(a)}{\\varepsilon} \\right) = \\lim_{{\\varepsilon \\to 0}} \\frac{\\alpha - \\alpha}{\\varepsilon} = \\lim_{{\\varepsilon \\to 0}} 0 = 0 \\\\\n", - "\\end{align*}\n", - "$$\n", - "Thus, the derivative of f(x) is f′(x) = 0. This makes sense, since our function is constant—the rate of change is 0.\n", - "\n", - "Note: The differential coefficient of f(x) at x = a is often simply called the derivative of f(x) at x = a, or just f′(a).\n", - "\n", - "2. Let’s calculate the derivative of linear function f(x) = αx + β. The derivative of f(x) at x = α is\n", - "\n", - "$$\n", - "\\begin{align*}\n", - "&\\lim_{{\\varepsilon \\to 0}} \\left( \\frac{f(\\alpha + \\varepsilon) - f(a)}{\\varepsilon} \\right) = \\lim_{{\\varepsilon \\to 0}} \\frac{\\alpha(a + \\varepsilon) + \\beta - (\\alpha a + \\beta)}{\\varepsilon} = \\lim_{{\\varepsilon \\to 0}} \\alpha = \\alpha \\\\\n", - "\\end{align*}\n", - "$$\n", - "Thus, the derivative of f(x) is f′(x) = α, a constant value. This result should also be intuitive—linear functions have a constant rate of change by definition.\n", - "\n", - "3. Let’s find the derivative of f(x) = x2. The differential coefficient of f(x) at x = a is\n", - "\n", - "$$\n", - "\\begin{align*}\n", - "&\\lim_{{\\varepsilon \\to 0}} \\left( \\frac{f(a + \\varepsilon) - f(a)}{\\varepsilon} \\right) = \\lim_{{\\varepsilon \\to 0}} \\left( (a + \\varepsilon)^2 - a^2 \\right) = \\lim_{{\\varepsilon \\to 0}} 2a\\varepsilon + \\varepsilon = \\lim_{{\\varepsilon \\to 0}} (2a + \\varepsilon) = 2a \\\\\n", - "\\end{align*}\n", - "$$\n", - "Thus, the differential coefficient of f(x) at x = a is 2a, or f′(a) = 2a. Therefore, the derivative of f(x) is f′(x) = 2x.\n", - "\n", - "### Summary\n", - "\n", - "- The calculation of a limit that appears in calculus is simply a formula calculating an error.\n", - "- A limit is used to obtain a derivative.\n", - "- The derivative is the slope of the tangent line at a given point.\n", - "- The derivative is nothing but the rate of change.\n" - ] - } - ] - }, + "name": "stdout", + "output_type": "stream", + "text": [ + "Started parsing the file under job_id 3a055e64-d91e-484e-b9b0-99a2e637c08d\n", + "." + ] + } + ], + "source": [ + "parsingInstructionMangaLatex = \"\"\"The provided document is a manga comic book, most page do NOT have title.\n", + "It does not contain table. Do not output table.\n", + "Try to reconstruct the dialog happening in a cohesive way.\n", + "Output any math equation in LATEX markdown (between $$)\"\"\"\n", + "withLatex = LlamaParse(\n", + " result_type=\"markdown\", parsing_instruction=parsingInstructionMangaLatex\n", + ").load_data(\"./manga.pdf\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ { - "cell_type": "markdown", - "source": [ - "And here is the result as rendered by https://upmath.me/ .\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "Over this short notebook we saw how to use parsing instructions to increase the quality and accuracy of parsing with LLamaParse!" - ], - "metadata": { - "id": "rfFdeWZKmmLW" - } + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\n", + "[Without instruction]------------------------------------------------------------\n", + "\n", + "\n", + "## Calculating the Derivative of a Constant, Linear, or Quadratic Function\n", + "\n", + "|1.|Let’s find the derivative of constant function f(x) = α. The differential coefficient of f(x) at x = a is|\n", + "|---|---|\n", + "| |lim ε→0 (f(a + ε) - f(a)) / ε = lim ε→0 (α - α) = lim ε→0 0 = 0|\n", + "| |Thus, the derivative of f(x) is f′(x) = 0. This makes sense, since our function is constant—the rate of change is 0.|\n", + "\n", + "Note: The differential coefficient of f(x) at x = a is often simply called the derivative of f(x) at x = a, or just f′(a).\n", + "\n", + "|2.|Let’s calculate the derivative of linear function f(x) = αx + β. The derivative of f(x) at x = α is|\n", + "|---|---|\n", + "| |lim ε→0 (f(α + ε) - f(a)) = lim ε→0 (α(a + ε) + β - (αa + β)) = lim ε→0 α = α|\n", + "| |Thus, the derivative of f(x) is f′(x) = α, a constant value. This result should also be intuitive—linear functions have a constant rate of change by definition.|\n", + "\n", + "|3.|Let’s find the derivative of f(x) = x^2, which appeared in the story. The differential coefficient of f(x) at x = a is|\n", + "|---|---|\n", + "| |lim ε→0 ((a + ε)^2 - a^2) / ε = lim (a^2 + 2aε + ε^2 - a^2) / ε = lim (2aε + ε^2) = lim (2a + ε) = 2a|\n", + "| |Thus, the differential coefficient of f(x) at x = a is 2a, or f′(a) = 2a. Therefore, the derivative of f(x) is f′(x) = 2x.|\n", + "\n", + "## Summary\n", + "\n", + "- The calculation of a limit that appears in calculus is simply a formula calculating an error.\n", + "- A limit is used to obtain a derivative.\n", + "- The derivative is the slope of the tangent line at a given point.\n", + "- The derivative is nothing but the rate of change.\n", + "\n", + "## Chapter 1 Let’s Differentiate a Function!\n", + "\n", + "\n", + "[With instruction to output math in LATEX!]------------------------------------------------------------\n", + "\n", + "\n", + "# Derivative of Constant, Linear, or Quadratic Function\n", + "\n", + "## Calculating the Derivative of a Constant, Linear, or Quadratic Function\n", + "\n", + "1. Let’s find the derivative of constant function f(x) = α. The differential coefficient of f(x) at x = a is\n", + "\n", + "$$\n", + "\\begin{align*}\n", + "&\\lim_{{\\varepsilon \\to 0}} \\left( \\frac{f(a + \\varepsilon) - f(a)}{\\varepsilon} \\right) = \\lim_{{\\varepsilon \\to 0}} \\frac{\\alpha - \\alpha}{\\varepsilon} = \\lim_{{\\varepsilon \\to 0}} 0 = 0 \\\\\n", + "\\end{align*}\n", + "$$\n", + "Thus, the derivative of f(x) is f′(x) = 0. This makes sense, since our function is constant—the rate of change is 0.\n", + "\n", + "Note: The differential coefficient of f(x) at x = a is often simply called the derivative of f(x) at x = a, or just f′(a).\n", + "\n", + "2. Let’s calculate the derivative of linear function f(x) = αx + β. The derivative of f(x) at x = α is\n", + "\n", + "$$\n", + "\\begin{align*}\n", + "&\\lim_{{\\varepsilon \\to 0}} \\left( \\frac{f(\\alpha + \\varepsilon) - f(a)}{\\varepsilon} \\right) = \\lim_{{\\varepsilon \\to 0}} \\frac{\\alpha(a + \\varepsilon) + \\beta - (\\alpha a + \\beta)}{\\varepsilon} = \\lim_{{\\varepsilon \\to 0}} \\alpha = \\alpha \\\\\n", + "\\end{align*}\n", + "$$\n", + "Thus, the derivative of f(x) is f′(x) = α, a constant value. This result should also be intuitive—linear functions have a constant rate of change by definition.\n", + "\n", + "3. Let’s find the derivative of f(x) = x2. The differential coefficient of f(x) at x = a is\n", + "\n", + "$$\n", + "\\begin{align*}\n", + "&\\lim_{{\\varepsilon \\to 0}} \\left( \\frac{f(a + \\varepsilon) - f(a)}{\\varepsilon} \\right) = \\lim_{{\\varepsilon \\to 0}} \\left( (a + \\varepsilon)^2 - a^2 \\right) = \\lim_{{\\varepsilon \\to 0}} 2a\\varepsilon + \\varepsilon = \\lim_{{\\varepsilon \\to 0}} (2a + \\varepsilon) = 2a \\\\\n", + "\\end{align*}\n", + "$$\n", + "Thus, the differential coefficient of f(x) at x = a is 2a, or f′(a) = 2a. Therefore, the derivative of f(x) is f′(x) = 2x.\n", + "\n", + "### Summary\n", + "\n", + "- The calculation of a limit that appears in calculus is simply a formula calculating an error.\n", + "- A limit is used to obtain a derivative.\n", + "- The derivative is the slope of the tangent line at a given point.\n", + "- The derivative is nothing but the rate of change.\n" + ] } - ] + ], + "source": [ + "target_page = 2\n", + "print(\n", + " \"\\n\\n[Without instruction]------------------------------------------------------------\\n\\n\"\n", + ")\n", + "print(vanilaParsing[0].text.split(\"\\n---\\n\")[target_page])\n", + "print(\n", + " \"\\n\\n[With instruction to output math in LATEX!]------------------------------------------------------------\\n\\n\"\n", + ")\n", + "print(withLatex[0].text.split(\"\\n---\\n\")[target_page])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "And here is the result as rendered by https://upmath.me/ .\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Over this short notebook we saw how to use parsing instructions to increase the quality and accuracy of parsing with LLamaParse!" + ] + } + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 0 } diff --git a/examples/demo_table_comparisons.ipynb b/examples/demo_table_comparisons.ipynb index 14c01e2..2c9fc10 100644 --- a/examples/demo_table_comparisons.ipynb +++ b/examples/demo_table_comparisons.ipynb @@ -56,15 +56,17 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# llama-parse is async-first, running the async code in a notebook requires the use of nest_asyncio\n", "import nest_asyncio\n", + "\n", "nest_asyncio.apply()\n", "\n", "import os\n", + "\n", "# API access to llama-cloud\n", "os.environ[\"LLAMA_CLOUD_API_KEY\"] = \"llx-\"\n", "\n", @@ -74,7 +76,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -83,11 +85,11 @@ "from llama_index.core import VectorStoreIndex\n", "from llama_index.core import Settings\n", "\n", - "embed_model=OpenAIEmbedding(model=\"text-embedding-3-small\")\n", + "embed_model = OpenAIEmbedding(model=\"text-embedding-3-small\")\n", "llm = OpenAI(model=\"gpt-3.5-turbo-0125\")\n", "\n", "Settings.llm = llm\n", - "Settings.embed_model = embed_model\n" + "Settings.embed_model = embed_model" ] }, { @@ -109,8 +111,8 @@ "source": [ "from llama_parse import LlamaParse\n", "\n", - "docs_2021 = LlamaParse(result_type=\"markdown\").load_data('./apple_2021_10k.pdf')\n", - "docs_2020 = LlamaParse(result_type=\"markdown\").load_data('./apple_2020_10k.pdf')" + "docs_2021 = LlamaParse(result_type=\"markdown\").load_data(\"./apple_2021_10k.pdf\")\n", + "docs_2020 = LlamaParse(result_type=\"markdown\").load_data(\"./apple_2020_10k.pdf\")" ] }, { @@ -127,31 +129,34 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from llama_index.core.node_parser import MarkdownElementNodeParser\n", "\n", - "node_parser = MarkdownElementNodeParser(llm=OpenAI(model=\"gpt-3.5-turbo-0125\"), num_workers=8)" + "node_parser = MarkdownElementNodeParser(\n", + " llm=OpenAI(model=\"gpt-3.5-turbo-0125\"), num_workers=8\n", + ")" ] }, { "cell_type": "code", - "execution_count": 46, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "import pickle\n", - "from llama_index.postprocessor.flag_embedding_reranker import FlagEmbeddingReranker\n", + "from llama_index.postprocessor.flag_embedding_reranker import (\n", + " FlagEmbeddingReranker,\n", + ")\n", "\n", "reranker = FlagEmbeddingReranker(\n", " top_n=5,\n", " model=\"BAAI/bge-reranker-large\",\n", ")\n", "\n", + "\n", "def create_query_engine_over_doc(docs, nodes_save_path=None):\n", " \"\"\"Big function to go from document path -> recursive retriever.\"\"\"\n", " if nodes_save_path is not None and os.path.exists(nodes_save_path):\n", @@ -161,16 +166,13 @@ " if nodes_save_path is not None:\n", " pickle.dump(raw_nodes, open(nodes_save_path, \"wb\"))\n", "\n", - " base_nodes, objects = node_parser.get_nodes_and_objects(\n", - " raw_nodes\n", - " )\n", + " base_nodes, objects = node_parser.get_nodes_and_objects(raw_nodes)\n", "\n", " ### Construct Retrievers\n", " # construct top-level vector index + query engine\n", - " vector_index = VectorStoreIndex(nodes=base_nodes+objects)\n", + " vector_index = VectorStoreIndex(nodes=base_nodes + objects)\n", " query_engine = vector_index.as_query_engine(\n", - " similarity_top_k=15,\n", - " node_postprocessors=[reranker]\n", + " similarity_top_k=15, node_postprocessors=[reranker]\n", " )\n", " return query_engine, base_nodes" ] @@ -178,9 +180,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "query_engine_2021, nodes_2021 = create_query_engine_over_doc(\n", @@ -193,10 +193,8 @@ }, { "cell_type": "code", - "execution_count": 38, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "from llama_index.core.tools import QueryEngineTool, ToolMetadata\n", @@ -209,18 +207,14 @@ " query_engine=query_engine_2021,\n", " metadata=ToolMetadata(\n", " name=\"apple_2021_10k\",\n", - " description=(\n", - " \"Provides information about Apple financials for year 2021\"\n", - " ),\n", + " description=(\"Provides information about Apple financials for year 2021\"),\n", " ),\n", " ),\n", " QueryEngineTool(\n", " query_engine=query_engine_2020,\n", " metadata=ToolMetadata(\n", " name=\"apple_2020_10k\",\n", - " description=(\n", - " \"Provides information about Apple financials for year 2020\"\n", - " ),\n", + " description=(\"Provides information about Apple financials for year 2020\"),\n", " ),\n", " ),\n", "]\n", @@ -241,10 +235,8 @@ }, { "cell_type": "code", - "execution_count": 41, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -271,10 +263,8 @@ }, { "cell_type": "code", - "execution_count": 40, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -290,10 +280,8 @@ }, { "cell_type": "code", - "execution_count": 42, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -316,10 +304,8 @@ }, { "cell_type": "code", - "execution_count": 44, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -342,10 +328,8 @@ }, { "cell_type": "code", - "execution_count": 45, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -358,13 +342,6 @@ "source": [ "print(str(response))" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { @@ -382,8 +359,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" + "pygments_lexer": "ipython3" } }, "nbformat": 4, diff --git a/examples/other_files/demo_ppt_basic.ipynb b/examples/other_files/demo_ppt_basic.ipynb index 7242bdf..3573a50 100644 --- a/examples/other_files/demo_ppt_basic.ipynb +++ b/examples/other_files/demo_ppt_basic.ipynb @@ -18,12 +18,11 @@ "cell_type": "code", "execution_count": null, "id": "14cdcfaf-88b4-4489-9910-e362e0ccec53", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "import nest_asyncio\n", + "\n", "nest_asyncio.apply()\n", "\n", "from llama_parse import LlamaParse" @@ -31,12 +30,13 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "6f5b5841-dd3e-4169-9bd4-6a672b5b34ee", "metadata": {}, "outputs": [], "source": [ "import os\n", + "\n", "os.environ[\"LLAMA_CLOUD_API_KEY\"] = \"llx-\"" ] }, @@ -68,7 +68,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "0dd0f860-8e92-43a7-9443-ad1a4fb9365c", "metadata": {}, "outputs": [], @@ -78,7 +78,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "fd932bef-ba82-4449-b7a0-5c2a9b55089f", "metadata": {}, "outputs": [ @@ -104,7 +104,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "2a73e553-2194-4ac9-9764-0edab0d6fdce", "metadata": {}, "outputs": [ @@ -308,11 +308,9 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "c779547f-e4f7-4c84-9786-2b6b749827ab", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from llama_index.core import VectorStoreIndex" @@ -320,7 +318,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "68b3a95e-ce19-4df1-9fdd-e6efb2fc423a", "metadata": {}, "outputs": [], @@ -330,11 +328,9 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "a2ae28f6-4b3a-4130-8e65-0921b7678739", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "query_engine = index.as_query_engine()" @@ -342,23 +338,21 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "id": "232091ee-aa22-4f51-838c-410024acc344", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ - "response = query_engine.query(\"What are some response quality challenges with naive RAG?\") " + "response = query_engine.query(\n", + " \"What are some response quality challenges with naive RAG?\"\n", + ")" ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "75f32aa7-c308-4221-af60-779822cfdba1", - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -371,14 +365,6 @@ "source": [ "print(str(response))" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d309d8fb-750a-4393-a1b2-67b14b7c121f", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { @@ -396,8 +382,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" + "pygments_lexer": "ipython3" } }, "nbformat": 4, diff --git a/examples/other_files/demo_ppt_financial.ipynb b/examples/other_files/demo_ppt_financial.ipynb index 947fadf..1221f36 100644 --- a/examples/other_files/demo_ppt_financial.ipynb +++ b/examples/other_files/demo_ppt_financial.ipynb @@ -2,9 +2,7 @@ "cells": [ { "cell_type": "markdown", - "metadata": { - "id": "eld1dKaN7P8B" - }, + "metadata": {}, "source": [ "# LlamaParse - Parsing Financial Powerpoints 📊\n", "\n", @@ -13,9 +11,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "goB1sV8zu_Xl" - }, + "metadata": {}, "source": [ "## Installation\n", "\n", @@ -27,13 +23,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "7Y3_BwQLu-qK", - "outputId": "b1129c52-7a70-44cc-ad03-1f8d3a8c794a" - }, + "metadata": {}, "outputs": [], "source": [ "!pip install llama-index\n", @@ -43,9 +33,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "i-Rg2D_Rvf2i" - }, + "metadata": {}, "source": [ "## API Key\n", "\n", @@ -55,32 +43,26 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "id": "af6i2P1vuU-U" - }, + "metadata": {}, "outputs": [], "source": [ "import os\n", + "\n", "os.environ[\"LLAMA_CLOUD_API_KEY\"] = \"llx-...\"\n", "os.environ[\"OPENAI_API_KEY\"] = \"sk-...\"" ] }, { "cell_type": "markdown", - "metadata": { - "id": "p8Eq-aX-wAEo" - }, + "metadata": {}, "source": [ "**NOTE**: Since LlamaParse is natively async, running the sync code in a notebook requires the use of nest_asyncio.\n" ] }, { "cell_type": "code", - "execution_count": 1, - "metadata": { - "id": "4OB0BkTqv_0l", - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "import nest_asyncio\n", @@ -90,9 +72,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "dz927ecMyYo_" - }, + "metadata": {}, "source": [ "## Importing the package\n", "\n", @@ -102,10 +82,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "id": "nSW-6sEwyXwx", - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from llama_parse import LlamaParse" @@ -113,9 +90,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "l_D4YsAHwUSk" - }, + "metadata": {}, "source": [ "## Using LlamaParse to Parse Presentations\n", "\n", @@ -127,14 +102,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "d3qeuiyawT0U", - "outputId": "cec0ea0a-be8b-49b6-9376-797c91f63be7", - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "! mkdir data; wget \"https://meetings.wmo.int/Cg-19/PublishingImages/SitePages/FINAC-43/7%20-%20EC-77-Doc%205%20Financial%20Statements%20for%202022%20(FINAC).pptx\" -O data/presentation.pptx" @@ -142,9 +110,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "Gbr8RiHEyF3-" - }, + "metadata": {}, "source": [ "### Parsing the presentation\n", "\n", @@ -155,24 +121,15 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "osocsofoJ42S" - }, + "metadata": {}, "source": [ "#### Llama Index default" ] }, { "cell_type": "code", - "execution_count": 5, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "PTVy5XCNJwW-", - "outputId": "d0e2cc4b-1407-45a9-b5e6-d06f91a533b4", - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "from llama_index.core import SimpleDirectoryReader\n", @@ -182,24 +139,15 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "oucbsciZJwxt" - }, + "metadata": {}, "source": [ "#### Llama Parse" ] }, { "cell_type": "code", - "execution_count": 6, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "3jKnXCuAyQ9_", - "outputId": "1f668f17-1e20-46e5-fbab-9a55e4b28891", - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -210,7 +158,9 @@ } ], "source": [ - "llama_parse_documents = LlamaParse(result_type=\"markdown\").load_data(\"./data/presentation.pptx\")" + "llama_parse_documents = LlamaParse(result_type=\"markdown\").load_data(\n", + " \"./data/presentation.pptx\"\n", + ")" ] }, { @@ -224,10 +174,8 @@ }, { "cell_type": "code", - "execution_count": 27, - "metadata": { - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -259,9 +207,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "Compared against the original slide image.\n", "![Demo](demo_ppt_financial_1.png)" @@ -269,9 +215,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "p4GVOdWzzvYg" - }, + "metadata": {}, "source": [ "## Comparing the two for RAG\n", "\n", @@ -280,20 +224,15 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "oVcdGus5NDxi" - }, + "metadata": {}, "source": [ "### Query Engine on SimpleDirectoryReader results" ] }, { "cell_type": "code", - "execution_count": 19, - "metadata": { - "id": "DqXYsLCWNg9_", - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "from llama_index.core import VectorStoreIndex, SimpleDirectoryReader\n", @@ -304,20 +243,15 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "ZLkHt9l2Nbxx" - }, + "metadata": {}, "source": [ "### Query Engine on LlamaParse Results\n" ] }, { "cell_type": "code", - "execution_count": 20, - "metadata": { - "id": "ZllaDcfRNLv3", - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "llama_parse_index = VectorStoreIndex.from_documents(llama_parse_documents)\n", @@ -326,10 +260,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "0dY_0_1bNg0X", - "tags": [] - }, + "metadata": {}, "source": [ "### Liability provision\n", "What was the liability provision as of Dec 31 2021?\n", @@ -339,15 +270,8 @@ }, { "cell_type": "code", - "execution_count": 21, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "Tmn-qNTEN-cb", - "outputId": "a9bffc00-9cfc-43d8-b159-596a6c1aca64", - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -358,21 +282,16 @@ } ], "source": [ - "vanilla_response = vanilla_query_engine.query(\"What was the liability provision as of Dec 31 2021?\")\n", + "vanilla_response = vanilla_query_engine.query(\n", + " \"What was the liability provision as of Dec 31 2021?\"\n", + ")\n", "print(vanilla_response)" ] }, { "cell_type": "code", - "execution_count": 22, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "4EZ_uqlROP7R", - "outputId": "0645a159-06c6-411e-d1f6-79ea95d32b42", - "tags": [] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -383,16 +302,11 @@ } ], "source": [ - "llama_parse_response = llama_parse_query_engine.query(\"What was the liability provision as of Dec 31 2021?\")\n", + "llama_parse_response = llama_parse_query_engine.query(\n", + " \"What was the liability provision as of Dec 31 2021?\"\n", + ")\n", "print(llama_parse_response)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { @@ -413,8 +327,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" + "pygments_lexer": "ipython3" } }, "nbformat": 4, diff --git a/llama_parse/__init__.py b/llama_parse/__init__.py index e91de47..d62b759 100644 --- a/llama_parse/__init__.py +++ b/llama_parse/__init__.py @@ -1,3 +1,3 @@ from llama_parse.base import LlamaParse, ResultType -__all__ = ["LlamaParse", "ResultType"] \ No newline at end of file +__all__ = ["LlamaParse", "ResultType"] diff --git a/llama_parse/base.py b/llama_parse/base.py index 88d1319..848aed9 100644 --- a/llama_parse/base.py +++ b/llama_parse/base.py @@ -17,12 +17,15 @@ nest_asyncio_err = "cannot be called from a running event loop" nest_asyncio_msg = "The event loop is already running. Add `import nest_asyncio; nest_asyncio.apply()` to your code to fix this issue." + class ResultType(str, Enum): """The result type for the parser.""" + TXT = "text" MD = "markdown" JSON = "json" + class Language(str, Enum): BAZA = "abq" ADYGHE = "ady" @@ -103,7 +106,7 @@ class Language(str, Enum): TAGALOG = "tl" TURKISH = "tr" UYGHUR = "ug" - UKRANIAN = "uk" + UKRAINIAN = "uk" URDU = "ur" UZBEK = "uz" VIETNAMESE = "vi" @@ -124,26 +127,20 @@ class Language(str, Enum): ".wps", # Word Perfect ".wpd", - # Open Office ".sxw", - ".stw", + ".stw", ".sxg", - # Apple ".pages", - # Mac Write ".mw", ".mcw", - - # Unified Office Format text ".uot", ".uof", ".uos", ".uop", - # Microsoft powerpoints ".ppt", ".pptx", @@ -151,21 +148,17 @@ class Language(str, Enum): ".pptm", ".potx", ".potm", - - # Apple keynote ".key", - # Open Office Presentations ".odp", ".odg", ".otp", ".fopd", - ".sxi", + ".sxi", ".sti", - # ebook - ".epub" + ".epub", ] @@ -183,8 +176,8 @@ class LlamaParse(BasePydanticReader): num_workers: int = Field( default=4, gt=0, - lt=10, - description="The number of workers to use sending API requests for parsing." + lt=10, + description="The number of workers to use sending API requests for parsing.", ) check_interval: int = Field( default=1, @@ -197,12 +190,18 @@ class LlamaParse(BasePydanticReader): verbose: bool = Field( default=True, description="Whether to print the progress of the parsing." ) - language: Language = Field( - default=Language.ENGLISH, description="The language of the text to parse." + show_progress: bool = Field( + default=True, description="Show progress when parsing multiple files." + ) + language: Language = Field( + default=Language.ENGLISH, description="The language of the text to parse." ) parsing_instruction: Optional[str] = Field( - default="", - description="The parsing instruction for the parser." + default="", description="The parsing instruction for the parser." + ) + ignore_errors: bool = Field( + default=True, + description="Whether or not to ignore and skip errors raised during parsing.", ) @validator("api_key", pre=True, always=True) @@ -210,13 +209,14 @@ def validate_api_key(cls, v: str) -> str: """Validate the API key.""" if not v: import os + api_key = os.getenv("LLAMA_CLOUD_API_KEY", None) if api_key is None: raise ValueError("The API key is required.") return api_key - + return v - + @validator("base_url", pre=True, always=True) def validate_base_url(cls, v: str) -> str: """Validate the base URL.""" @@ -224,7 +224,9 @@ def validate_base_url(cls, v: str) -> str: return url or v or DEFAULT_BASE_URL # upload a document and get back a job_id - async def _create_job(self, file_path: str, extra_info: Optional[dict] = None) -> str: + async def _create_job( + self, file_path: str, extra_info: Optional[dict] = None + ) -> str: file_path = str(file_path) file_ext = os.path.splitext(file_path)[1] if file_ext not in SUPPORTED_FILE_TYPES: @@ -246,7 +248,15 @@ async def _create_job(self, file_path: str, extra_info: Optional[dict] = None) - # send the request, start job url = f"{self.base_url}/api/parsing/upload" async with httpx.AsyncClient(timeout=self.max_timeout) as client: - response = await client.post(url, files=files, headers=headers, data={"language": self.language.value, "parsing_instruction": self.parsing_instruction}) + response = await client.post( + url, + files=files, + headers=headers, + data={ + "language": self.language.value, + "parsing_instruction": self.parsing_instruction, + }, + ) if not response.is_success: raise Exception(f"Failed to parse the file: {response.text}") @@ -254,43 +264,65 @@ async def _create_job(self, file_path: str, extra_info: Optional[dict] = None) - job_id = response.json()["id"] return job_id - async def _get_job_result(self, job_id: str, result_type: str) -> dict: + async def _get_job_result( + self, job_id: str, result_type: str, verbose: bool = False + ) -> dict: result_url = f"{self.base_url}/api/parsing/job/{job_id}/result/{result_type}" + status_url = f"{self.base_url}/api/parsing/job/{job_id}" headers = {"Authorization": f"Bearer {self.api_key}"} start = time.time() tries = 0 while True: await asyncio.sleep(self.check_interval) - async with httpx.AsyncClient(timeout=self.max_timeout) as client: - tries += 1 - - result = await client.get(result_url, headers=headers) + async with httpx.AsyncClient(timeout=self.max_timeout) as client: + tries += 1 + + result = await client.get(status_url, headers=headers) - if result.status_code == 404: + if result.status_code != 200: end = time.time() if end - start > self.max_timeout: - raise Exception( - f"Timeout while parsing the file: {job_id}" - ) - if self.verbose and tries % 10 == 0: + raise Exception(f"Timeout while parsing the file: {job_id}") + if verbose and tries % 10 == 0: print(".", end="", flush=True) + + await asyncio.sleep(self.check_interval) + continue - if result.status_code == 400: - detail = result.json().get("detail", "Unknown error") - raise Exception(f"Failed to parse the file: {detail}") + # Allowed values "PENDING", "SUCCESS", "ERROR", "CANCELED" + status = result.json()["status"] + if status == "SUCCESS": + parsed_result = await client.get(result_url, headers=headers) + return parsed_result.json() + elif status == "PENDING": + end = time.time() + if end - start > self.max_timeout: + raise Exception(f"Timeout while parsing the file: {job_id}") + if verbose and tries % 10 == 0: + print(".", end="", flush=True) - return result.json() + await asyncio.sleep(self.check_interval) - async def _aload_data(self, file_path: str, extra_info: Optional[dict] = None) -> List[Document]: + continue + else: + raise Exception( + f"Failed to parse the file: {job_id}, status: {status}" + ) + + async def _aload_data( + self, file_path: str, extra_info: Optional[dict] = None, verbose: bool = False + ) -> List[Document]: """Load data from the input path.""" try: job_id = await self._create_job(file_path, extra_info=extra_info) - if self.verbose: + if verbose: print("Started parsing the file under job_id %s" % job_id) - - result = await self._get_job_result(job_id, self.result_type.value) + + result = await self._get_job_result( + job_id, self.result_type.value, verbose=verbose + ) return [ Document( @@ -298,22 +330,39 @@ async def _aload_data(self, file_path: str, extra_info: Optional[dict] = None) - metadata=extra_info or {}, ) ] - + except Exception as e: print(f"Error while parsing the file '{file_path}':", e) - raise e - return [] - + if self.ignore_errors: + return [] + else: + raise e - async def aload_data(self, file_path: Union[List[str], str], extra_info: Optional[dict] = None) -> List[Document]: + async def aload_data( + self, file_path: Union[List[str], str], extra_info: Optional[dict] = None + ) -> List[Document]: """Load data from the input path.""" if isinstance(file_path, (str, Path)): - return await self._aload_data(file_path, extra_info=extra_info) + return await self._aload_data( + file_path, extra_info=extra_info, verbose=self.verbose + ) elif isinstance(file_path, list): - jobs = [self._aload_data(f, extra_info=extra_info) for f in file_path] + jobs = [ + self._aload_data( + f, + extra_info=extra_info, + verbose=self.verbose and not self.show_progress, + ) + for f in file_path + ] try: - results = await run_jobs(jobs, workers=self.num_workers) - + results = await run_jobs( + jobs, + workers=self.num_workers, + desc="Parsing files", + show_progress=self.show_progress, + ) + # return flattened results return [item for sublist in results for item in sublist] except RuntimeError as e: @@ -322,9 +371,13 @@ async def aload_data(self, file_path: Union[List[str], str], extra_info: Optiona else: raise e else: - raise ValueError("The input file_path must be a string or a list of strings.") + raise ValueError( + "The input file_path must be a string or a list of strings." + ) - def load_data(self, file_path: Union[List[str], str], extra_info: Optional[dict] = None) -> List[Document]: + def load_data( + self, file_path: Union[List[str], str], extra_info: Optional[dict] = None + ) -> List[Document]: """Load data from the input path.""" try: return asyncio.run(self.aload_data(file_path, extra_info)) @@ -333,35 +386,44 @@ def load_data(self, file_path: Union[List[str], str], extra_info: Optional[dict] raise RuntimeError(nest_asyncio_msg) else: raise e - - async def _aget_json(self, file_path: str, extra_info: Optional[dict] = None) -> List[dict]: + async def _aget_json( + self, file_path: str, extra_info: Optional[dict] = None + ) -> List[dict]: """Load data from the input path.""" try: job_id = await self._create_job(file_path, extra_info=extra_info) if self.verbose: print("Started parsing the file under job_id %s" % job_id) - + result = await self._get_job_result(job_id, "json") result["job_id"] = job_id result["file_path"] = file_path return [result] - + except Exception as e: print(f"Error while parsing the file '{file_path}':", e) - raise e - - + if self.ignore_errors: + return [] + else: + raise e - async def aget_json(self, file_path: Union[List[str], str], extra_info: Optional[dict] = None) -> List[dict]: + async def aget_json( + self, file_path: Union[List[str], str], extra_info: Optional[dict] = None + ) -> List[dict]: """Load data from the input path.""" if isinstance(file_path, (str, Path)): return await self._aget_json(file_path, extra_info=extra_info) elif isinstance(file_path, list): jobs = [self._aget_json(f, extra_info=extra_info) for f in file_path] try: - results = await run_jobs(jobs, workers=self.num_workers) - + results = await run_jobs( + jobs, + workers=self.num_workers, + desc="Parsing files", + show_progress=self.show_progress, + ) + # return flattened results return [item for sublist in results for item in sublist] except RuntimeError as e: @@ -370,10 +432,13 @@ async def aget_json(self, file_path: Union[List[str], str], extra_info: Optional else: raise e else: - raise ValueError("The input file_path must be a string or a list of strings.") - + raise ValueError( + "The input file_path must be a string or a list of strings." + ) - def get_json_result(self, file_path: Union[List[str], str], extra_info: Optional[dict] = None) -> List[dict]: + def get_json_result( + self, file_path: Union[List[str], str], extra_info: Optional[dict] = None + ) -> List[dict]: """Parse the input path.""" try: return asyncio.run(self.aget_json(file_path, extra_info)) @@ -382,8 +447,8 @@ def get_json_result(self, file_path: Union[List[str], str], extra_info: Optional raise RuntimeError(nest_asyncio_msg) else: raise e - - def get_images(self, json_result: list[dict], download_path: str) -> List[dict]: + + def get_images(self, json_result: List[dict], download_path: str) -> List[dict]: """Download images from the parsed result.""" headers = {"Authorization": f"Bearer {self.api_key}"} try: @@ -395,16 +460,21 @@ def get_images(self, json_result: list[dict], download_path: str) -> List[dict]: print(f"> Image for page {page['page']}: {page['images']}") for image in page["images"]: image_name = image["name"] - image_path = os.path.join(download_path, f"{job_id}-{image_name}") - image["path"]=image_path - image["job_id"]=job_id - image["original_pdf_path"]=result["file_path"] - image["page_number"]=page["page"] + image_path = os.path.join( + download_path, f"{job_id}-{image_name}" + ) + image["path"] = image_path + image["job_id"] = job_id + image["original_pdf_path"] = result["file_path"] + image["page_number"] = page["page"] with open(image_path, "wb") as f: image_url = f"{self.base_url}/api/parsing/job/{job_id}/result/image/{image_name}" f.write(httpx.get(image_url, headers=headers).content) images.append(image) return images except Exception as e: - print(f"Error while downloading images from the parsed result:", e) - return [] \ No newline at end of file + print("Error while downloading images from the parsed result:", e) + if self.ignore_errors: + return [] + else: + raise e diff --git a/poetry.lock b/poetry.lock index 0b1d28a..d54cbf4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,88 +1,88 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "aiohttp" -version = "3.9.3" +version = "3.9.4" description = "Async http client/server framework (asyncio)" optional = false python-versions = ">=3.8" files = [ - {file = "aiohttp-3.9.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:939677b61f9d72a4fa2a042a5eee2a99a24001a67c13da113b2e30396567db54"}, - {file = "aiohttp-3.9.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1f5cd333fcf7590a18334c90f8c9147c837a6ec8a178e88d90a9b96ea03194cc"}, - {file = "aiohttp-3.9.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:82e6aa28dd46374f72093eda8bcd142f7771ee1eb9d1e223ff0fa7177a96b4a5"}, - {file = "aiohttp-3.9.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f56455b0c2c7cc3b0c584815264461d07b177f903a04481dfc33e08a89f0c26b"}, - {file = "aiohttp-3.9.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bca77a198bb6e69795ef2f09a5f4c12758487f83f33d63acde5f0d4919815768"}, - {file = "aiohttp-3.9.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e083c285857b78ee21a96ba1eb1b5339733c3563f72980728ca2b08b53826ca5"}, - {file = "aiohttp-3.9.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ab40e6251c3873d86ea9b30a1ac6d7478c09277b32e14745d0d3c6e76e3c7e29"}, - {file = "aiohttp-3.9.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:df822ee7feaaeffb99c1a9e5e608800bd8eda6e5f18f5cfb0dc7eeb2eaa6bbec"}, - {file = "aiohttp-3.9.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:acef0899fea7492145d2bbaaaec7b345c87753168589cc7faf0afec9afe9b747"}, - {file = "aiohttp-3.9.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:cd73265a9e5ea618014802ab01babf1940cecb90c9762d8b9e7d2cc1e1969ec6"}, - {file = "aiohttp-3.9.3-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:a78ed8a53a1221393d9637c01870248a6f4ea5b214a59a92a36f18151739452c"}, - {file = "aiohttp-3.9.3-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:6b0e029353361f1746bac2e4cc19b32f972ec03f0f943b390c4ab3371840aabf"}, - {file = "aiohttp-3.9.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7cf5c9458e1e90e3c390c2639f1017a0379a99a94fdfad3a1fd966a2874bba52"}, - {file = "aiohttp-3.9.3-cp310-cp310-win32.whl", hash = "sha256:3e59c23c52765951b69ec45ddbbc9403a8761ee6f57253250c6e1536cacc758b"}, - {file = "aiohttp-3.9.3-cp310-cp310-win_amd64.whl", hash = "sha256:055ce4f74b82551678291473f66dc9fb9048a50d8324278751926ff0ae7715e5"}, - {file = "aiohttp-3.9.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6b88f9386ff1ad91ace19d2a1c0225896e28815ee09fc6a8932fded8cda97c3d"}, - {file = "aiohttp-3.9.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c46956ed82961e31557b6857a5ca153c67e5476972e5f7190015018760938da2"}, - {file = "aiohttp-3.9.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:07b837ef0d2f252f96009e9b8435ec1fef68ef8b1461933253d318748ec1acdc"}, - {file = "aiohttp-3.9.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad46e6f620574b3b4801c68255492e0159d1712271cc99d8bdf35f2043ec266"}, - {file = "aiohttp-3.9.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ed3e046ea7b14938112ccd53d91c1539af3e6679b222f9469981e3dac7ba1ce"}, - {file = "aiohttp-3.9.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:039df344b45ae0b34ac885ab5b53940b174530d4dd8a14ed8b0e2155b9dddccb"}, - {file = "aiohttp-3.9.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7943c414d3a8d9235f5f15c22ace69787c140c80b718dcd57caaade95f7cd93b"}, - {file = "aiohttp-3.9.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:84871a243359bb42c12728f04d181a389718710129b36b6aad0fc4655a7647d4"}, - {file = "aiohttp-3.9.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:5eafe2c065df5401ba06821b9a054d9cb2848867f3c59801b5d07a0be3a380ae"}, - {file = "aiohttp-3.9.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:9d3c9b50f19704552f23b4eaea1fc082fdd82c63429a6506446cbd8737823da3"}, - {file = "aiohttp-3.9.3-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:f033d80bc6283092613882dfe40419c6a6a1527e04fc69350e87a9df02bbc283"}, - {file = "aiohttp-3.9.3-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:2c895a656dd7e061b2fd6bb77d971cc38f2afc277229ce7dd3552de8313a483e"}, - {file = "aiohttp-3.9.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1f5a71d25cd8106eab05f8704cd9167b6e5187bcdf8f090a66c6d88b634802b4"}, - {file = "aiohttp-3.9.3-cp311-cp311-win32.whl", hash = "sha256:50fca156d718f8ced687a373f9e140c1bb765ca16e3d6f4fe116e3df7c05b2c5"}, - {file = "aiohttp-3.9.3-cp311-cp311-win_amd64.whl", hash = "sha256:5fe9ce6c09668063b8447f85d43b8d1c4e5d3d7e92c63173e6180b2ac5d46dd8"}, - {file = "aiohttp-3.9.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:38a19bc3b686ad55804ae931012f78f7a534cce165d089a2059f658f6c91fa60"}, - {file = "aiohttp-3.9.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:770d015888c2a598b377bd2f663adfd947d78c0124cfe7b959e1ef39f5b13869"}, - {file = "aiohttp-3.9.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ee43080e75fc92bf36219926c8e6de497f9b247301bbf88c5c7593d931426679"}, - {file = "aiohttp-3.9.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:52df73f14ed99cee84865b95a3d9e044f226320a87af208f068ecc33e0c35b96"}, - {file = "aiohttp-3.9.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc9b311743a78043b26ffaeeb9715dc360335e5517832f5a8e339f8a43581e4d"}, - {file = "aiohttp-3.9.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b955ed993491f1a5da7f92e98d5dad3c1e14dc175f74517c4e610b1f2456fb11"}, - {file = "aiohttp-3.9.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:504b6981675ace64c28bf4a05a508af5cde526e36492c98916127f5a02354d53"}, - {file = "aiohttp-3.9.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a6fe5571784af92b6bc2fda8d1925cccdf24642d49546d3144948a6a1ed58ca5"}, - {file = "aiohttp-3.9.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ba39e9c8627edc56544c8628cc180d88605df3892beeb2b94c9bc857774848ca"}, - {file = "aiohttp-3.9.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:e5e46b578c0e9db71d04c4b506a2121c0cb371dd89af17a0586ff6769d4c58c1"}, - {file = "aiohttp-3.9.3-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:938a9653e1e0c592053f815f7028e41a3062e902095e5a7dc84617c87267ebd5"}, - {file = "aiohttp-3.9.3-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:c3452ea726c76e92f3b9fae4b34a151981a9ec0a4847a627c43d71a15ac32aa6"}, - {file = "aiohttp-3.9.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ff30218887e62209942f91ac1be902cc80cddb86bf00fbc6783b7a43b2bea26f"}, - {file = "aiohttp-3.9.3-cp312-cp312-win32.whl", hash = "sha256:38f307b41e0bea3294a9a2a87833191e4bcf89bb0365e83a8be3a58b31fb7f38"}, - {file = "aiohttp-3.9.3-cp312-cp312-win_amd64.whl", hash = "sha256:b791a3143681a520c0a17e26ae7465f1b6f99461a28019d1a2f425236e6eedb5"}, - {file = "aiohttp-3.9.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:0ed621426d961df79aa3b963ac7af0d40392956ffa9be022024cd16297b30c8c"}, - {file = "aiohttp-3.9.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7f46acd6a194287b7e41e87957bfe2ad1ad88318d447caf5b090012f2c5bb528"}, - {file = "aiohttp-3.9.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:feeb18a801aacb098220e2c3eea59a512362eb408d4afd0c242044c33ad6d542"}, - {file = "aiohttp-3.9.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f734e38fd8666f53da904c52a23ce517f1b07722118d750405af7e4123933511"}, - {file = "aiohttp-3.9.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b40670ec7e2156d8e57f70aec34a7216407848dfe6c693ef131ddf6e76feb672"}, - {file = "aiohttp-3.9.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fdd215b7b7fd4a53994f238d0f46b7ba4ac4c0adb12452beee724ddd0743ae5d"}, - {file = "aiohttp-3.9.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:017a21b0df49039c8f46ca0971b3a7fdc1f56741ab1240cb90ca408049766168"}, - {file = "aiohttp-3.9.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e99abf0bba688259a496f966211c49a514e65afa9b3073a1fcee08856e04425b"}, - {file = "aiohttp-3.9.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:648056db9a9fa565d3fa851880f99f45e3f9a771dd3ff3bb0c048ea83fb28194"}, - {file = "aiohttp-3.9.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8aacb477dc26797ee089721536a292a664846489c49d3ef9725f992449eda5a8"}, - {file = "aiohttp-3.9.3-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:522a11c934ea660ff8953eda090dcd2154d367dec1ae3c540aff9f8a5c109ab4"}, - {file = "aiohttp-3.9.3-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:5bce0dc147ca85caa5d33debc4f4d65e8e8b5c97c7f9f660f215fa74fc49a321"}, - {file = "aiohttp-3.9.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:4b4af9f25b49a7be47c0972139e59ec0e8285c371049df1a63b6ca81fdd216a2"}, - {file = "aiohttp-3.9.3-cp38-cp38-win32.whl", hash = "sha256:298abd678033b8571995650ccee753d9458dfa0377be4dba91e4491da3f2be63"}, - {file = "aiohttp-3.9.3-cp38-cp38-win_amd64.whl", hash = "sha256:69361bfdca5468c0488d7017b9b1e5ce769d40b46a9f4a2eed26b78619e9396c"}, - {file = "aiohttp-3.9.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:0fa43c32d1643f518491d9d3a730f85f5bbaedcbd7fbcae27435bb8b7a061b29"}, - {file = "aiohttp-3.9.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:835a55b7ca49468aaaac0b217092dfdff370e6c215c9224c52f30daaa735c1c1"}, - {file = "aiohttp-3.9.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:06a9b2c8837d9a94fae16c6223acc14b4dfdff216ab9b7202e07a9a09541168f"}, - {file = "aiohttp-3.9.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:abf151955990d23f84205286938796c55ff11bbfb4ccfada8c9c83ae6b3c89a3"}, - {file = "aiohttp-3.9.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:59c26c95975f26e662ca78fdf543d4eeaef70e533a672b4113dd888bd2423caa"}, - {file = "aiohttp-3.9.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f95511dd5d0e05fd9728bac4096319f80615aaef4acbecb35a990afebe953b0e"}, - {file = "aiohttp-3.9.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:595f105710293e76b9dc09f52e0dd896bd064a79346234b521f6b968ffdd8e58"}, - {file = "aiohttp-3.9.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7c8b816c2b5af5c8a436df44ca08258fc1a13b449393a91484225fcb7545533"}, - {file = "aiohttp-3.9.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f1088fa100bf46e7b398ffd9904f4808a0612e1d966b4aa43baa535d1b6341eb"}, - {file = "aiohttp-3.9.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f59dfe57bb1ec82ac0698ebfcdb7bcd0e99c255bd637ff613760d5f33e7c81b3"}, - {file = "aiohttp-3.9.3-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:361a1026c9dd4aba0109e4040e2aecf9884f5cfe1b1b1bd3d09419c205e2e53d"}, - {file = "aiohttp-3.9.3-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:363afe77cfcbe3a36353d8ea133e904b108feea505aa4792dad6585a8192c55a"}, - {file = "aiohttp-3.9.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e2c45c208c62e955e8256949eb225bd8b66a4c9b6865729a786f2aa79b72e9d"}, - {file = "aiohttp-3.9.3-cp39-cp39-win32.whl", hash = "sha256:f7217af2e14da0856e082e96ff637f14ae45c10a5714b63c77f26d8884cf1051"}, - {file = "aiohttp-3.9.3-cp39-cp39-win_amd64.whl", hash = "sha256:27468897f628c627230dba07ec65dc8d0db566923c48f29e084ce382119802bc"}, - {file = "aiohttp-3.9.3.tar.gz", hash = "sha256:90842933e5d1ff760fae6caca4b2b3edba53ba8f4b71e95dacf2818a2aca06f7"}, + {file = "aiohttp-3.9.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:76d32588ef7e4a3f3adff1956a0ba96faabbdee58f2407c122dd45aa6e34f372"}, + {file = "aiohttp-3.9.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:56181093c10dbc6ceb8a29dfeea1e815e1dfdc020169203d87fd8d37616f73f9"}, + {file = "aiohttp-3.9.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c7a5b676d3c65e88b3aca41816bf72831898fcd73f0cbb2680e9d88e819d1e4d"}, + {file = "aiohttp-3.9.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d1df528a85fb404899d4207a8d9934cfd6be626e30e5d3a5544a83dbae6d8a7e"}, + {file = "aiohttp-3.9.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f595db1bceabd71c82e92df212dd9525a8a2c6947d39e3c994c4f27d2fe15b11"}, + {file = "aiohttp-3.9.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c0b09d76e5a4caac3d27752027fbd43dc987b95f3748fad2b924a03fe8632ad"}, + {file = "aiohttp-3.9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:689eb4356649ec9535b3686200b231876fb4cab4aca54e3bece71d37f50c1d13"}, + {file = "aiohttp-3.9.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3666cf4182efdb44d73602379a66f5fdfd5da0db5e4520f0ac0dcca644a3497"}, + {file = "aiohttp-3.9.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b65b0f8747b013570eea2f75726046fa54fa8e0c5db60f3b98dd5d161052004a"}, + {file = "aiohttp-3.9.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a1885d2470955f70dfdd33a02e1749613c5a9c5ab855f6db38e0b9389453dce7"}, + {file = "aiohttp-3.9.4-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:0593822dcdb9483d41f12041ff7c90d4d1033ec0e880bcfaf102919b715f47f1"}, + {file = "aiohttp-3.9.4-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:47f6eb74e1ecb5e19a78f4a4228aa24df7fbab3b62d4a625d3f41194a08bd54f"}, + {file = "aiohttp-3.9.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c8b04a3dbd54de6ccb7604242fe3ad67f2f3ca558f2d33fe19d4b08d90701a89"}, + {file = "aiohttp-3.9.4-cp310-cp310-win32.whl", hash = "sha256:8a78dfb198a328bfb38e4308ca8167028920fb747ddcf086ce706fbdd23b2926"}, + {file = "aiohttp-3.9.4-cp310-cp310-win_amd64.whl", hash = "sha256:e78da6b55275987cbc89141a1d8e75f5070e577c482dd48bd9123a76a96f0bbb"}, + {file = "aiohttp-3.9.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:c111b3c69060d2bafc446917534150fd049e7aedd6cbf21ba526a5a97b4402a5"}, + {file = "aiohttp-3.9.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:efbdd51872cf170093998c87ccdf3cb5993add3559341a8e5708bcb311934c94"}, + {file = "aiohttp-3.9.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7bfdb41dc6e85d8535b00d73947548a748e9534e8e4fddd2638109ff3fb081df"}, + {file = "aiohttp-3.9.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2bd9d334412961125e9f68d5b73c1d0ab9ea3f74a58a475e6b119f5293eee7ba"}, + {file = "aiohttp-3.9.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:35d78076736f4a668d57ade00c65d30a8ce28719d8a42471b2a06ccd1a2e3063"}, + {file = "aiohttp-3.9.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:824dff4f9f4d0f59d0fa3577932ee9a20e09edec8a2f813e1d6b9f89ced8293f"}, + {file = "aiohttp-3.9.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:52b8b4e06fc15519019e128abedaeb56412b106ab88b3c452188ca47a25c4093"}, + {file = "aiohttp-3.9.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eae569fb1e7559d4f3919965617bb39f9e753967fae55ce13454bec2d1c54f09"}, + {file = "aiohttp-3.9.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:69b97aa5792428f321f72aeb2f118e56893371f27e0b7d05750bcad06fc42ca1"}, + {file = "aiohttp-3.9.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4d79aad0ad4b980663316f26d9a492e8fab2af77c69c0f33780a56843ad2f89e"}, + {file = "aiohttp-3.9.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:d6577140cd7db19e430661e4b2653680194ea8c22c994bc65b7a19d8ec834403"}, + {file = "aiohttp-3.9.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:9860d455847cd98eb67897f5957b7cd69fbcb436dd3f06099230f16a66e66f79"}, + {file = "aiohttp-3.9.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:69ff36d3f8f5652994e08bd22f093e11cfd0444cea310f92e01b45a4e46b624e"}, + {file = "aiohttp-3.9.4-cp311-cp311-win32.whl", hash = "sha256:e27d3b5ed2c2013bce66ad67ee57cbf614288bda8cdf426c8d8fe548316f1b5f"}, + {file = "aiohttp-3.9.4-cp311-cp311-win_amd64.whl", hash = "sha256:d6a67e26daa686a6fbdb600a9af8619c80a332556245fa8e86c747d226ab1a1e"}, + {file = "aiohttp-3.9.4-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:c5ff8ff44825736a4065d8544b43b43ee4c6dd1530f3a08e6c0578a813b0aa35"}, + {file = "aiohttp-3.9.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d12a244627eba4e9dc52cbf924edef905ddd6cafc6513849b4876076a6f38b0e"}, + {file = "aiohttp-3.9.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:dcad56c8d8348e7e468899d2fb3b309b9bc59d94e6db08710555f7436156097f"}, + {file = "aiohttp-3.9.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f7e69a7fd4b5ce419238388e55abd220336bd32212c673ceabc57ccf3d05b55"}, + {file = "aiohttp-3.9.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4870cb049f10d7680c239b55428916d84158798eb8f353e74fa2c98980dcc0b"}, + {file = "aiohttp-3.9.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3b2feaf1b7031ede1bc0880cec4b0776fd347259a723d625357bb4b82f62687b"}, + {file = "aiohttp-3.9.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:939393e8c3f0a5bcd33ef7ace67680c318dc2ae406f15e381c0054dd658397de"}, + {file = "aiohttp-3.9.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d2334e387b2adcc944680bebcf412743f2caf4eeebd550f67249c1c3696be04"}, + {file = "aiohttp-3.9.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:e0198ea897680e480845ec0ffc5a14e8b694e25b3f104f63676d55bf76a82f1a"}, + {file = "aiohttp-3.9.4-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:e40d2cd22914d67c84824045861a5bb0fb46586b15dfe4f046c7495bf08306b2"}, + {file = "aiohttp-3.9.4-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:aba80e77c227f4234aa34a5ff2b6ff30c5d6a827a91d22ff6b999de9175d71bd"}, + {file = "aiohttp-3.9.4-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:fb68dc73bc8ac322d2e392a59a9e396c4f35cb6fdbdd749e139d1d6c985f2527"}, + {file = "aiohttp-3.9.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f3460a92638dce7e47062cf088d6e7663adb135e936cb117be88d5e6c48c9d53"}, + {file = "aiohttp-3.9.4-cp312-cp312-win32.whl", hash = "sha256:32dc814ddbb254f6170bca198fe307920f6c1308a5492f049f7f63554b88ef36"}, + {file = "aiohttp-3.9.4-cp312-cp312-win_amd64.whl", hash = "sha256:63f41a909d182d2b78fe3abef557fcc14da50c7852f70ae3be60e83ff64edba5"}, + {file = "aiohttp-3.9.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:c3770365675f6be220032f6609a8fbad994d6dcf3ef7dbcf295c7ee70884c9af"}, + {file = "aiohttp-3.9.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:305edae1dea368ce09bcb858cf5a63a064f3bff4767dec6fa60a0cc0e805a1d3"}, + {file = "aiohttp-3.9.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6f121900131d116e4a93b55ab0d12ad72573f967b100e49086e496a9b24523ea"}, + {file = "aiohttp-3.9.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b71e614c1ae35c3d62a293b19eface83d5e4d194e3eb2fabb10059d33e6e8cbf"}, + {file = "aiohttp-3.9.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:419f009fa4cfde4d16a7fc070d64f36d70a8d35a90d71aa27670bba2be4fd039"}, + {file = "aiohttp-3.9.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7b39476ee69cfe64061fd77a73bf692c40021f8547cda617a3466530ef63f947"}, + {file = "aiohttp-3.9.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b33f34c9c7decdb2ab99c74be6443942b730b56d9c5ee48fb7df2c86492f293c"}, + {file = "aiohttp-3.9.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c78700130ce2dcebb1a8103202ae795be2fa8c9351d0dd22338fe3dac74847d9"}, + {file = "aiohttp-3.9.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:268ba22d917655d1259af2d5659072b7dc11b4e1dc2cb9662fdd867d75afc6a4"}, + {file = "aiohttp-3.9.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:17e7c051f53a0d2ebf33013a9cbf020bb4e098c4bc5bce6f7b0c962108d97eab"}, + {file = "aiohttp-3.9.4-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:7be99f4abb008cb38e144f85f515598f4c2c8932bf11b65add0ff59c9c876d99"}, + {file = "aiohttp-3.9.4-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:d58a54d6ff08d2547656356eea8572b224e6f9bbc0cf55fa9966bcaac4ddfb10"}, + {file = "aiohttp-3.9.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7673a76772bda15d0d10d1aa881b7911d0580c980dbd16e59d7ba1422b2d83cd"}, + {file = "aiohttp-3.9.4-cp38-cp38-win32.whl", hash = "sha256:e4370dda04dc8951012f30e1ce7956a0a226ac0714a7b6c389fb2f43f22a250e"}, + {file = "aiohttp-3.9.4-cp38-cp38-win_amd64.whl", hash = "sha256:eb30c4510a691bb87081192a394fb661860e75ca3896c01c6d186febe7c88530"}, + {file = "aiohttp-3.9.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:84e90494db7df3be5e056f91412f9fa9e611fbe8ce4aaef70647297f5943b276"}, + {file = "aiohttp-3.9.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7d4845f8501ab28ebfdbeab980a50a273b415cf69e96e4e674d43d86a464df9d"}, + {file = "aiohttp-3.9.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:69046cd9a2a17245c4ce3c1f1a4ff8c70c7701ef222fce3d1d8435f09042bba1"}, + {file = "aiohttp-3.9.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b73a06bafc8dcc508420db43b4dd5850e41e69de99009d0351c4f3007960019"}, + {file = "aiohttp-3.9.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:418bb0038dfafeac923823c2e63226179976c76f981a2aaad0ad5d51f2229bca"}, + {file = "aiohttp-3.9.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:71a8f241456b6c2668374d5d28398f8e8cdae4cce568aaea54e0f39359cd928d"}, + {file = "aiohttp-3.9.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:935c369bf8acc2dc26f6eeb5222768aa7c62917c3554f7215f2ead7386b33748"}, + {file = "aiohttp-3.9.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:74e4e48c8752d14ecfb36d2ebb3d76d614320570e14de0a3aa7a726ff150a03c"}, + {file = "aiohttp-3.9.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:916b0417aeddf2c8c61291238ce25286f391a6acb6f28005dd9ce282bd6311b6"}, + {file = "aiohttp-3.9.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9b6787b6d0b3518b2ee4cbeadd24a507756ee703adbac1ab6dc7c4434b8c572a"}, + {file = "aiohttp-3.9.4-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:221204dbda5ef350e8db6287937621cf75e85778b296c9c52260b522231940ed"}, + {file = "aiohttp-3.9.4-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:10afd99b8251022ddf81eaed1d90f5a988e349ee7d779eb429fb07b670751e8c"}, + {file = "aiohttp-3.9.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2506d9f7a9b91033201be9ffe7d89c6a54150b0578803cce5cb84a943d075bc3"}, + {file = "aiohttp-3.9.4-cp39-cp39-win32.whl", hash = "sha256:e571fdd9efd65e86c6af2f332e0e95dad259bfe6beb5d15b3c3eca3a6eb5d87b"}, + {file = "aiohttp-3.9.4-cp39-cp39-win_amd64.whl", hash = "sha256:7d29dd5319d20aa3b7749719ac9685fbd926f71ac8c77b2477272725f882072d"}, + {file = "aiohttp-3.9.4.tar.gz", hash = "sha256:6ff71ede6d9a5a58cfb7b6fffc83ab5d4a63138276c771ac91ceaaddf5459644"}, ] [package.dependencies] @@ -417,13 +417,13 @@ files = [ [[package]] name = "comm" -version = "0.2.1" +version = "0.2.2" description = "Jupyter Python Comm implementation, for usage in ipykernel, xeus-python etc." optional = false python-versions = ">=3.8" files = [ - {file = "comm-0.2.1-py3-none-any.whl", hash = "sha256:87928485c0dfc0e7976fd89fc1e187023cf587e7c353e4a9b417555b44adf021"}, - {file = "comm-0.2.1.tar.gz", hash = "sha256:0bc91edae1344d39d3661dcbc36937181fdaddb304790458f8b044dbc064b89a"}, + {file = "comm-0.2.2-py3-none-any.whl", hash = "sha256:e6fb86cb70ff661ee8c9c14e7d36d6de3b4066f1441be4063df9c5009f0a64d3"}, + {file = "comm-0.2.2.tar.gz", hash = "sha256:3fd7a84065306e07bea1773df6eb8282de51ba82f77c72f9c85716ab11fe980e"}, ] [package.dependencies] @@ -644,13 +644,13 @@ files = [ [[package]] name = "fsspec" -version = "2024.2.0" +version = "2024.3.1" description = "File-system specification" optional = false python-versions = ">=3.8" files = [ - {file = "fsspec-2024.2.0-py3-none-any.whl", hash = "sha256:817f969556fa5916bc682e02ca2045f96ff7f586d45110fcb76022063ad2c7d8"}, - {file = "fsspec-2024.2.0.tar.gz", hash = "sha256:b6ad1a679f760dda52b1168c859d01b7b80648ea6f7f7c7f5a8a91dc3f3ecb84"}, + {file = "fsspec-2024.3.1-py3-none-any.whl", hash = "sha256:918d18d41bf73f0e2b261824baeb1b124bcf771767e3a26425cd7dec3332f512"}, + {file = "fsspec-2024.3.1.tar.gz", hash = "sha256:f39780e282d7d117ffb42bb96992f8a90795e4d0fb0f661a70ca39fe9c43ded9"}, ] [package.extras] @@ -761,13 +761,13 @@ files = [ [[package]] name = "httpcore" -version = "1.0.3" +version = "1.0.5" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpcore-1.0.3-py3-none-any.whl", hash = "sha256:9a6a501c3099307d9fd76ac244e08503427679b1e81ceb1d922485e2f2462ad2"}, - {file = "httpcore-1.0.3.tar.gz", hash = "sha256:5c0f9546ad17dac4d0772b0808856eb616eb8b48ce94f49ed819fd6982a8a544"}, + {file = "httpcore-1.0.5-py3-none-any.whl", hash = "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5"}, + {file = "httpcore-1.0.5.tar.gz", hash = "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61"}, ] [package.dependencies] @@ -778,17 +778,17 @@ h11 = ">=0.13,<0.15" asyncio = ["anyio (>=4.0,<5.0)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] -trio = ["trio (>=0.22.0,<0.24.0)"] +trio = ["trio (>=0.22.0,<0.26.0)"] [[package]] name = "httpx" -version = "0.26.0" +version = "0.27.0" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpx-0.26.0-py3-none-any.whl", hash = "sha256:8915f5a3627c4d47b73e8202457cb28f1266982d1159bd5779d86a80c0eab1cd"}, - {file = "httpx-0.26.0.tar.gz", hash = "sha256:451b55c30d5185ea6b23c2c793abf9bb237d2a7dfb901ced6ff69ad37ec1dfaf"}, + {file = "httpx-0.27.0-py3-none-any.whl", hash = "sha256:71d5465162c13681bff01ad59b2cc68dd838ea1f10e51574bac27103f00c91a5"}, + {file = "httpx-0.27.0.tar.gz", hash = "sha256:a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5"}, ] [package.dependencies] @@ -806,33 +806,33 @@ socks = ["socksio (==1.*)"] [[package]] name = "idna" -version = "3.6" +version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" files = [ - {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, - {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] [[package]] name = "importlib-metadata" -version = "7.0.1" +version = "7.1.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-7.0.1-py3-none-any.whl", hash = "sha256:4805911c3a4ec7c3966410053e9ec6a1fecd629117df5adee56dfc9432a1081e"}, - {file = "importlib_metadata-7.0.1.tar.gz", hash = "sha256:f238736bb06590ae52ac1fab06a3a9ef1d8dce2b7a35b5ab329371d6c8f5d2cc"}, + {file = "importlib_metadata-7.1.0-py3-none-any.whl", hash = "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570"}, + {file = "importlib_metadata-7.1.0.tar.gz", hash = "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2"}, ] [package.dependencies] zipp = ">=0.5" [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] [[package]] name = "iniconfig" @@ -847,13 +847,13 @@ files = [ [[package]] name = "ipykernel" -version = "6.29.2" +version = "6.29.4" description = "IPython Kernel for Jupyter" optional = false python-versions = ">=3.8" files = [ - {file = "ipykernel-6.29.2-py3-none-any.whl", hash = "sha256:50384f5c577a260a1d53f1f59a828c7266d321c9b7d00d345693783f66616055"}, - {file = "ipykernel-6.29.2.tar.gz", hash = "sha256:3bade28004e3ff624ed57974948116670604ac5f676d12339693f3142176d3f0"}, + {file = "ipykernel-6.29.4-py3-none-any.whl", hash = "sha256:1181e653d95c6808039c509ef8e67c4126b3b3af7781496c7cbfb5ed938a27da"}, + {file = "ipykernel-6.29.4.tar.gz", hash = "sha256:3d44070060f9475ac2092b760123fadf105d2e2493c24848b6691a7c4f42af5c"}, ] [package.dependencies] @@ -876,7 +876,7 @@ cov = ["coverage[toml]", "curio", "matplotlib", "pytest-cov", "trio"] docs = ["myst-parser", "pydata-sphinx-theme", "sphinx", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling", "trio"] pyqt5 = ["pyqt5"] pyside6 = ["pyside6"] -test = ["flaky", "ipyparallel", "pre-commit", "pytest (>=7.0)", "pytest-asyncio (==0.23.4)", "pytest-cov", "pytest-timeout"] +test = ["flaky", "ipyparallel", "pre-commit", "pytest (>=7.0)", "pytest-asyncio (>=0.23.5)", "pytest-cov", "pytest-timeout"] [[package]] name = "ipython" @@ -938,24 +938,24 @@ testing = ["Django", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] [[package]] name = "joblib" -version = "1.3.2" +version = "1.4.0" description = "Lightweight pipelining with Python functions" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "joblib-1.3.2-py3-none-any.whl", hash = "sha256:ef4331c65f239985f3f2220ecc87db222f08fd22097a3dd5698f693875f8cbb9"}, - {file = "joblib-1.3.2.tar.gz", hash = "sha256:92f865e621e17784e7955080b6d042489e3b8e294949cc44c6eac304f59772b1"}, + {file = "joblib-1.4.0-py3-none-any.whl", hash = "sha256:42942470d4062537be4d54c83511186da1fc14ba354961a2114da91efa9a4ed7"}, + {file = "joblib-1.4.0.tar.gz", hash = "sha256:1eb0dc091919cd384490de890cb5dfd538410a6d4b3b54eef09fb8c50b409b1c"}, ] [[package]] name = "jupyter-client" -version = "8.6.0" +version = "8.6.1" description = "Jupyter protocol implementation and client libraries" optional = false python-versions = ">=3.8" files = [ - {file = "jupyter_client-8.6.0-py3-none-any.whl", hash = "sha256:909c474dbe62582ae62b758bca86d6518c85234bdee2d908c778db6d72f39d99"}, - {file = "jupyter_client-8.6.0.tar.gz", hash = "sha256:0642244bb83b4764ae60d07e010e15f0e2d275ec4e918a8f7b80fbbef3ca60c7"}, + {file = "jupyter_client-8.6.1-py3-none-any.whl", hash = "sha256:3b7bd22f058434e3b9a7ea4b1500ed47de2713872288c0d511d19926f99b459f"}, + {file = "jupyter_client-8.6.1.tar.gz", hash = "sha256:e842515e2bab8e19186d89fdfea7abd15e39dd581f94e399f00e2af5a1652d3f"}, ] [package.dependencies] @@ -972,13 +972,13 @@ test = ["coverage", "ipykernel (>=6.14)", "mypy", "paramiko", "pre-commit", "pyt [[package]] name = "jupyter-core" -version = "5.7.1" +version = "5.7.2" description = "Jupyter core package. A base package on which Jupyter projects rely." optional = false python-versions = ">=3.8" files = [ - {file = "jupyter_core-5.7.1-py3-none-any.whl", hash = "sha256:c65c82126453a723a2804aa52409930434598fd9d35091d63dfb919d2b765bb7"}, - {file = "jupyter_core-5.7.1.tar.gz", hash = "sha256:de61a9d7fc71240f688b2fb5ab659fbb56979458dc66a71decd098e03c79e218"}, + {file = "jupyter_core-5.7.2-py3-none-any.whl", hash = "sha256:4f7315d2f6b4bcf2e3e7cb6e46772eba760ae459cd1f59d29eb57b0a01bd7409"}, + {file = "jupyter_core-5.7.2.tar.gz", hash = "sha256:aa5f8d32bbf6b431ac830496da7392035d6f61b4f54872f15c4bd2a9c3f536d9"}, ] [package.dependencies] @@ -988,17 +988,17 @@ traitlets = ">=5.3" [package.extras] docs = ["myst-parser", "pydata-sphinx-theme", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling", "traitlets"] -test = ["ipykernel", "pre-commit", "pytest", "pytest-cov", "pytest-timeout"] +test = ["ipykernel", "pre-commit", "pytest (<8)", "pytest-cov", "pytest-timeout"] [[package]] name = "llama-index-core" -version = "0.10.7" +version = "0.10.29" description = "Interface between LLMs and your data" optional = false -python-versions = ">=3.8.1,<4.0" +python-versions = "<4.0,>=3.8.1" files = [ - {file = "llama_index_core-0.10.7-py3-none-any.whl", hash = "sha256:0dd1ec2878451d75d4644757cc24c8533d83a6c62ffa2ac0a4f1745a31cbb1ad"}, - {file = "llama_index_core-0.10.7.tar.gz", hash = "sha256:d02f92128ce285110e953ed116a3db1ba02eec508d11ccdca14a851ece5eaead"}, + {file = "llama_index_core-0.10.29-py3-none-any.whl", hash = "sha256:105eace45d877f31ff330e9afe7e86bd212b776b96d594862f24c60e03ab99b9"}, + {file = "llama_index_core-0.10.29.tar.gz", hash = "sha256:65188c9917ec0847005ebd4343d7eaf9ddc80cea50d876a02eccbb16f1684371"}, ] [package.dependencies] @@ -1008,7 +1008,7 @@ deprecated = ">=1.2.9.3" dirtyjson = ">=1.0.8,<2.0.0" fsspec = ">=2023.5.0" httpx = "*" -llamaindex-py-client = ">=0.1.13,<0.2.0" +llamaindex-py-client = ">=0.1.18,<0.2.0" nest-asyncio = ">=1.5.8,<2.0.0" networkx = ">=3.0" nltk = ">=3.8.1,<4.0.0" @@ -1024,24 +1024,25 @@ tiktoken = ">=0.3.3" tqdm = ">=4.66.1,<5.0.0" typing-extensions = ">=4.5.0" typing-inspect = ">=0.8.0" +wrapt = "*" [package.extras] gradientai = ["gradientai (>=1.4.0)"] html = ["beautifulsoup4 (>=4.12.2,<5.0.0)"] langchain = ["langchain (>=0.0.303)"] local-models = ["optimum[onnxruntime] (>=1.13.2,<2.0.0)", "sentencepiece (>=0.1.99,<0.2.0)", "transformers[torch] (>=4.33.1,<5.0.0)"] -postgres = ["asyncpg (>=0.28.0,<0.29.0)", "pgvector (>=0.1.0,<0.2.0)", "psycopg2-binary (>=2.9.9,<3.0.0)"] +postgres = ["asyncpg (>=0.29.0,<0.30.0)", "pgvector (>=0.2.4,<0.3.0)", "psycopg2-binary (>=2.9.9,<3.0.0)"] query-tools = ["guidance (>=0.0.64,<0.0.65)", "jsonpath-ng (>=1.6.0,<2.0.0)", "lm-format-enforcer (>=0.4.3,<0.5.0)", "rank-bm25 (>=0.2.2,<0.3.0)", "scikit-learn", "spacy (>=3.7.1,<4.0.0)"] [[package]] name = "llamaindex-py-client" -version = "0.1.13" +version = "0.1.18" description = "" optional = false -python-versions = ">=3.8,<4.0" +python-versions = "<4,>=3.8" files = [ - {file = "llamaindex_py_client-0.1.13-py3-none-any.whl", hash = "sha256:02400c90655da80ae373e0455c829465208607d72462f1898fd383fdfe8dabce"}, - {file = "llamaindex_py_client-0.1.13.tar.gz", hash = "sha256:3bd9b435ee0a78171eba412dea5674d813eb5bf36e577d3c7c7e90edc54900d9"}, + {file = "llamaindex_py_client-0.1.18-py3-none-any.whl", hash = "sha256:5417e41666504a77ecf5bdd9b403ffff1d714880ee30d49e234fb7686177eeeb"}, + {file = "llamaindex_py_client-0.1.18.tar.gz", hash = "sha256:091ee49a92592e3894777ade12516c2137093f9d6441a549f406461917ce9b7e"}, ] [package.dependencies] @@ -1050,22 +1051,21 @@ pydantic = ">=1.10" [[package]] name = "marshmallow" -version = "3.20.2" +version = "3.21.1" description = "A lightweight library for converting complex datatypes to and from native Python datatypes." optional = false python-versions = ">=3.8" files = [ - {file = "marshmallow-3.20.2-py3-none-any.whl", hash = "sha256:c21d4b98fee747c130e6bc8f45c4b3199ea66bc00c12ee1f639f0aeca034d5e9"}, - {file = "marshmallow-3.20.2.tar.gz", hash = "sha256:4c1daff273513dc5eb24b219a8035559dc573c8f322558ef85f5438ddd1236dd"}, + {file = "marshmallow-3.21.1-py3-none-any.whl", hash = "sha256:f085493f79efb0644f270a9bf2892843142d80d7174bbbd2f3713f2a589dc633"}, + {file = "marshmallow-3.21.1.tar.gz", hash = "sha256:4e65e9e0d80fc9e609574b9983cf32579f305c718afb30d7233ab818571768c3"}, ] [package.dependencies] packaging = ">=17.0" [package.extras] -dev = ["pre-commit (>=2.4,<4.0)", "pytest", "pytz", "simplejson", "tox"] -docs = ["alabaster (==0.7.15)", "autodocsumm (==0.2.12)", "sphinx (==7.2.6)", "sphinx-issues (==3.0.1)", "sphinx-version-warning (==1.1.2)"] -lint = ["pre-commit (>=2.4,<4.0)"] +dev = ["marshmallow[tests]", "pre-commit (>=3.5,<4.0)", "tox"] +docs = ["alabaster (==0.7.16)", "autodocsumm (==0.2.12)", "sphinx (==7.2.6)", "sphinx-issues (==4.0.0)", "sphinx-version-warning (==1.1.2)"] tests = ["pytest", "pytz", "simplejson"] [[package]] @@ -1285,13 +1285,13 @@ files = [ [[package]] name = "openai" -version = "1.12.0" +version = "1.17.1" description = "The official Python library for the openai API" optional = false python-versions = ">=3.7.1" files = [ - {file = "openai-1.12.0-py3-none-any.whl", hash = "sha256:a54002c814e05222e413664f651b5916714e4700d041d5cf5724d3ae1a3e3481"}, - {file = "openai-1.12.0.tar.gz", hash = "sha256:99c5d257d09ea6533d689d1cc77caa0ac679fa21efef8893d8b0832a86877f1b"}, + {file = "openai-1.17.1-py3-none-any.whl", hash = "sha256:d42e0d7a692c7b78cbae21598df5ded396abecf6c285325635ec62621e6c82f1"}, + {file = "openai-1.17.1.tar.gz", hash = "sha256:c5a909e70e2b4cd04ef4076b68497c4eb894704cf8ab23d32d6552931fda6e5b"}, ] [package.dependencies] @@ -1308,13 +1308,13 @@ datalib = ["numpy (>=1)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)"] [[package]] name = "packaging" -version = "23.2" +version = "24.0" description = "Core utilities for Python packages" optional = false python-versions = ">=3.7" files = [ - {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, - {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, + {file = "packaging-24.0-py3-none-any.whl", hash = "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5"}, + {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, ] [[package]] @@ -1386,18 +1386,18 @@ xml = ["lxml (>=4.6.3)"] [[package]] name = "parso" -version = "0.8.3" +version = "0.8.4" description = "A Python Parser" optional = false python-versions = ">=3.6" files = [ - {file = "parso-0.8.3-py2.py3-none-any.whl", hash = "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75"}, - {file = "parso-0.8.3.tar.gz", hash = "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0"}, + {file = "parso-0.8.4-py2.py3-none-any.whl", hash = "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18"}, + {file = "parso-0.8.4.tar.gz", hash = "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d"}, ] [package.extras] -qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] -testing = ["docopt", "pytest (<6.0.0)"] +qa = ["flake8 (==5.0.4)", "mypy (==0.971)", "types-setuptools (==67.2.0.1)"] +testing = ["docopt", "pytest"] [[package]] name = "pexpect" @@ -1426,79 +1426,80 @@ files = [ [[package]] name = "pillow" -version = "10.2.0" +version = "10.3.0" description = "Python Imaging Library (Fork)" optional = false python-versions = ">=3.8" files = [ - {file = "pillow-10.2.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:7823bdd049099efa16e4246bdf15e5a13dbb18a51b68fa06d6c1d4d8b99a796e"}, - {file = "pillow-10.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:83b2021f2ade7d1ed556bc50a399127d7fb245e725aa0113ebd05cfe88aaf588"}, - {file = "pillow-10.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fad5ff2f13d69b7e74ce5b4ecd12cc0ec530fcee76356cac6742785ff71c452"}, - {file = "pillow-10.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da2b52b37dad6d9ec64e653637a096905b258d2fc2b984c41ae7d08b938a67e4"}, - {file = "pillow-10.2.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:47c0995fc4e7f79b5cfcab1fc437ff2890b770440f7696a3ba065ee0fd496563"}, - {file = "pillow-10.2.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:322bdf3c9b556e9ffb18f93462e5f749d3444ce081290352c6070d014c93feb2"}, - {file = "pillow-10.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:51f1a1bffc50e2e9492e87d8e09a17c5eea8409cda8d3f277eb6edc82813c17c"}, - {file = "pillow-10.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:69ffdd6120a4737710a9eee73e1d2e37db89b620f702754b8f6e62594471dee0"}, - {file = "pillow-10.2.0-cp310-cp310-win32.whl", hash = "sha256:c6dafac9e0f2b3c78df97e79af707cdc5ef8e88208d686a4847bab8266870023"}, - {file = "pillow-10.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:aebb6044806f2e16ecc07b2a2637ee1ef67a11840a66752751714a0d924adf72"}, - {file = "pillow-10.2.0-cp310-cp310-win_arm64.whl", hash = "sha256:7049e301399273a0136ff39b84c3678e314f2158f50f517bc50285fb5ec847ad"}, - {file = "pillow-10.2.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:35bb52c37f256f662abdfa49d2dfa6ce5d93281d323a9af377a120e89a9eafb5"}, - {file = "pillow-10.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9c23f307202661071d94b5e384e1e1dc7dfb972a28a2310e4ee16103e66ddb67"}, - {file = "pillow-10.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:773efe0603db30c281521a7c0214cad7836c03b8ccff897beae9b47c0b657d61"}, - {file = "pillow-10.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11fa2e5984b949b0dd6d7a94d967743d87c577ff0b83392f17cb3990d0d2fd6e"}, - {file = "pillow-10.2.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:716d30ed977be8b37d3ef185fecb9e5a1d62d110dfbdcd1e2a122ab46fddb03f"}, - {file = "pillow-10.2.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:a086c2af425c5f62a65e12fbf385f7c9fcb8f107d0849dba5839461a129cf311"}, - {file = "pillow-10.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c8de2789052ed501dd829e9cae8d3dcce7acb4777ea4a479c14521c942d395b1"}, - {file = "pillow-10.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:609448742444d9290fd687940ac0b57fb35e6fd92bdb65386e08e99af60bf757"}, - {file = "pillow-10.2.0-cp311-cp311-win32.whl", hash = "sha256:823ef7a27cf86df6597fa0671066c1b596f69eba53efa3d1e1cb8b30f3533068"}, - {file = "pillow-10.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:1da3b2703afd040cf65ec97efea81cfba59cdbed9c11d8efc5ab09df9509fc56"}, - {file = "pillow-10.2.0-cp311-cp311-win_arm64.whl", hash = "sha256:edca80cbfb2b68d7b56930b84a0e45ae1694aeba0541f798e908a49d66b837f1"}, - {file = "pillow-10.2.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:1b5e1b74d1bd1b78bc3477528919414874748dd363e6272efd5abf7654e68bef"}, - {file = "pillow-10.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0eae2073305f451d8ecacb5474997c08569fb4eb4ac231ffa4ad7d342fdc25ac"}, - {file = "pillow-10.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b7c2286c23cd350b80d2fc9d424fc797575fb16f854b831d16fd47ceec078f2c"}, - {file = "pillow-10.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e23412b5c41e58cec602f1135c57dfcf15482013ce6e5f093a86db69646a5aa"}, - {file = "pillow-10.2.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:52a50aa3fb3acb9cf7213573ef55d31d6eca37f5709c69e6858fe3bc04a5c2a2"}, - {file = "pillow-10.2.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:127cee571038f252a552760076407f9cff79761c3d436a12af6000cd182a9d04"}, - {file = "pillow-10.2.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:8d12251f02d69d8310b046e82572ed486685c38f02176bd08baf216746eb947f"}, - {file = "pillow-10.2.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:54f1852cd531aa981bc0965b7d609f5f6cc8ce8c41b1139f6ed6b3c54ab82bfb"}, - {file = "pillow-10.2.0-cp312-cp312-win32.whl", hash = "sha256:257d8788df5ca62c980314053197f4d46eefedf4e6175bc9412f14412ec4ea2f"}, - {file = "pillow-10.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:154e939c5f0053a383de4fd3d3da48d9427a7e985f58af8e94d0b3c9fcfcf4f9"}, - {file = "pillow-10.2.0-cp312-cp312-win_arm64.whl", hash = "sha256:f379abd2f1e3dddb2b61bc67977a6b5a0a3f7485538bcc6f39ec76163891ee48"}, - {file = "pillow-10.2.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:8373c6c251f7ef8bda6675dd6d2b3a0fcc31edf1201266b5cf608b62a37407f9"}, - {file = "pillow-10.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:870ea1ada0899fd0b79643990809323b389d4d1d46c192f97342eeb6ee0b8483"}, - {file = "pillow-10.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4b6b1e20608493548b1f32bce8cca185bf0480983890403d3b8753e44077129"}, - {file = "pillow-10.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3031709084b6e7852d00479fd1d310b07d0ba82765f973b543c8af5061cf990e"}, - {file = "pillow-10.2.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:3ff074fc97dd4e80543a3e91f69d58889baf2002b6be64347ea8cf5533188213"}, - {file = "pillow-10.2.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:cb4c38abeef13c61d6916f264d4845fab99d7b711be96c326b84df9e3e0ff62d"}, - {file = "pillow-10.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b1b3020d90c2d8e1dae29cf3ce54f8094f7938460fb5ce8bc5c01450b01fbaf6"}, - {file = "pillow-10.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:170aeb00224ab3dc54230c797f8404507240dd868cf52066f66a41b33169bdbe"}, - {file = "pillow-10.2.0-cp38-cp38-win32.whl", hash = "sha256:c4225f5220f46b2fde568c74fca27ae9771536c2e29d7c04f4fb62c83275ac4e"}, - {file = "pillow-10.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:0689b5a8c5288bc0504d9fcee48f61a6a586b9b98514d7d29b840143d6734f39"}, - {file = "pillow-10.2.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:b792a349405fbc0163190fde0dc7b3fef3c9268292586cf5645598b48e63dc67"}, - {file = "pillow-10.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c570f24be1e468e3f0ce7ef56a89a60f0e05b30a3669a459e419c6eac2c35364"}, - {file = "pillow-10.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8ecd059fdaf60c1963c58ceb8997b32e9dc1b911f5da5307aab614f1ce5c2fb"}, - {file = "pillow-10.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c365fd1703040de1ec284b176d6af5abe21b427cb3a5ff68e0759e1e313a5e7e"}, - {file = "pillow-10.2.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:70c61d4c475835a19b3a5aa42492409878bbca7438554a1f89d20d58a7c75c01"}, - {file = "pillow-10.2.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:b6f491cdf80ae540738859d9766783e3b3c8e5bd37f5dfa0b76abdecc5081f13"}, - {file = "pillow-10.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9d189550615b4948f45252d7f005e53c2040cea1af5b60d6f79491a6e147eef7"}, - {file = "pillow-10.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:49d9ba1ed0ef3e061088cd1e7538a0759aab559e2e0a80a36f9fd9d8c0c21591"}, - {file = "pillow-10.2.0-cp39-cp39-win32.whl", hash = "sha256:babf5acfede515f176833ed6028754cbcd0d206f7f614ea3447d67c33be12516"}, - {file = "pillow-10.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:0304004f8067386b477d20a518b50f3fa658a28d44e4116970abfcd94fac34a8"}, - {file = "pillow-10.2.0-cp39-cp39-win_arm64.whl", hash = "sha256:0fb3e7fc88a14eacd303e90481ad983fd5b69c761e9e6ef94c983f91025da869"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:322209c642aabdd6207517e9739c704dc9f9db943015535783239022002f054a"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3eedd52442c0a5ff4f887fab0c1c0bb164d8635b32c894bc1faf4c618dd89df2"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cb28c753fd5eb3dd859b4ee95de66cc62af91bcff5db5f2571d32a520baf1f04"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:33870dc4653c5017bf4c8873e5488d8f8d5f8935e2f1fb9a2208c47cdd66efd2"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:3c31822339516fb3c82d03f30e22b1d038da87ef27b6a78c9549888f8ceda39a"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a2b56ba36e05f973d450582fb015594aaa78834fefe8dfb8fcd79b93e64ba4c6"}, - {file = "pillow-10.2.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:d8e6aeb9201e655354b3ad049cb77d19813ad4ece0df1249d3c793de3774f8c7"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:2247178effb34a77c11c0e8ac355c7a741ceca0a732b27bf11e747bbc950722f"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15587643b9e5eb26c48e49a7b33659790d28f190fc514a322d55da2fb5c2950e"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753cd8f2086b2b80180d9b3010dd4ed147efc167c90d3bf593fe2af21265e5a5"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:7c8f97e8e7a9009bcacbe3766a36175056c12f9a44e6e6f2d5caad06dcfbf03b"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:d1b35bcd6c5543b9cb547dee3150c93008f8dd0f1fef78fc0cd2b141c5baf58a"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:fe4c15f6c9285dc54ce6553a3ce908ed37c8f3825b5a51a15c91442bb955b868"}, - {file = "pillow-10.2.0.tar.gz", hash = "sha256:e87f0b2c78157e12d7686b27d63c070fd65d994e8ddae6f328e0dcf4a0cd007e"}, + {file = "pillow-10.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:90b9e29824800e90c84e4022dd5cc16eb2d9605ee13f05d47641eb183cd73d45"}, + {file = "pillow-10.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a2c405445c79c3f5a124573a051062300936b0281fee57637e706453e452746c"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78618cdbccaa74d3f88d0ad6cb8ac3007f1a6fa5c6f19af64b55ca170bfa1edf"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:261ddb7ca91fcf71757979534fb4c128448b5b4c55cb6152d280312062f69599"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:ce49c67f4ea0609933d01c0731b34b8695a7a748d6c8d186f95e7d085d2fe475"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:b14f16f94cbc61215115b9b1236f9c18403c15dd3c52cf629072afa9d54c1cbf"}, + {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d33891be6df59d93df4d846640f0e46f1a807339f09e79a8040bc887bdcd7ed3"}, + {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b50811d664d392f02f7761621303eba9d1b056fb1868c8cdf4231279645c25f5"}, + {file = "pillow-10.3.0-cp310-cp310-win32.whl", hash = "sha256:ca2870d5d10d8726a27396d3ca4cf7976cec0f3cb706debe88e3a5bd4610f7d2"}, + {file = "pillow-10.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:f0d0591a0aeaefdaf9a5e545e7485f89910c977087e7de2b6c388aec32011e9f"}, + {file = "pillow-10.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:ccce24b7ad89adb5a1e34a6ba96ac2530046763912806ad4c247356a8f33a67b"}, + {file = "pillow-10.3.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:5f77cf66e96ae734717d341c145c5949c63180842a545c47a0ce7ae52ca83795"}, + {file = "pillow-10.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e4b878386c4bf293578b48fc570b84ecfe477d3b77ba39a6e87150af77f40c57"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdcbb4068117dfd9ce0138d068ac512843c52295ed996ae6dd1faf537b6dbc27"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9797a6c8fe16f25749b371c02e2ade0efb51155e767a971c61734b1bf6293994"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:9e91179a242bbc99be65e139e30690e081fe6cb91a8e77faf4c409653de39451"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:1b87bd9d81d179bd8ab871603bd80d8645729939f90b71e62914e816a76fc6bd"}, + {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:81d09caa7b27ef4e61cb7d8fbf1714f5aec1c6b6c5270ee53504981e6e9121ad"}, + {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:048ad577748b9fa4a99a0548c64f2cb8d672d5bf2e643a739ac8faff1164238c"}, + {file = "pillow-10.3.0-cp311-cp311-win32.whl", hash = "sha256:7161ec49ef0800947dc5570f86568a7bb36fa97dd09e9827dc02b718c5643f09"}, + {file = "pillow-10.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:8eb0908e954d093b02a543dc963984d6e99ad2b5e36503d8a0aaf040505f747d"}, + {file = "pillow-10.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:4e6f7d1c414191c1199f8996d3f2282b9ebea0945693fb67392c75a3a320941f"}, + {file = "pillow-10.3.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:e46f38133e5a060d46bd630faa4d9fa0202377495df1f068a8299fd78c84de84"}, + {file = "pillow-10.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:50b8eae8f7334ec826d6eeffaeeb00e36b5e24aa0b9df322c247539714c6df19"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d3bea1c75f8c53ee4d505c3e67d8c158ad4df0d83170605b50b64025917f338"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19aeb96d43902f0a783946a0a87dbdad5c84c936025b8419da0a0cd7724356b1"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:74d28c17412d9caa1066f7a31df8403ec23d5268ba46cd0ad2c50fb82ae40462"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:ff61bfd9253c3915e6d41c651d5f962da23eda633cf02262990094a18a55371a"}, + {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d886f5d353333b4771d21267c7ecc75b710f1a73d72d03ca06df49b09015a9ef"}, + {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b5ec25d8b17217d635f8935dbc1b9aa5907962fae29dff220f2659487891cd3"}, + {file = "pillow-10.3.0-cp312-cp312-win32.whl", hash = "sha256:51243f1ed5161b9945011a7360e997729776f6e5d7005ba0c6879267d4c5139d"}, + {file = "pillow-10.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:412444afb8c4c7a6cc11a47dade32982439925537e483be7c0ae0cf96c4f6a0b"}, + {file = "pillow-10.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:798232c92e7665fe82ac085f9d8e8ca98826f8e27859d9a96b41d519ecd2e49a"}, + {file = "pillow-10.3.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:4eaa22f0d22b1a7e93ff0a596d57fdede2e550aecffb5a1ef1106aaece48e96b"}, + {file = "pillow-10.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cd5e14fbf22a87321b24c88669aad3a51ec052eb145315b3da3b7e3cc105b9a2"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1530e8f3a4b965eb6a7785cf17a426c779333eb62c9a7d1bbcf3ffd5bf77a4aa"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d512aafa1d32efa014fa041d38868fda85028e3f930a96f85d49c7d8ddc0383"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:339894035d0ede518b16073bdc2feef4c991ee991a29774b33e515f1d308e08d"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:aa7e402ce11f0885305bfb6afb3434b3cd8f53b563ac065452d9d5654c7b86fd"}, + {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0ea2a783a2bdf2a561808fe4a7a12e9aa3799b701ba305de596bc48b8bdfce9d"}, + {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c78e1b00a87ce43bb37642c0812315b411e856a905d58d597750eb79802aaaa3"}, + {file = "pillow-10.3.0-cp38-cp38-win32.whl", hash = "sha256:72d622d262e463dfb7595202d229f5f3ab4b852289a1cd09650362db23b9eb0b"}, + {file = "pillow-10.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:2034f6759a722da3a3dbd91a81148cf884e91d1b747992ca288ab88c1de15999"}, + {file = "pillow-10.3.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:2ed854e716a89b1afcedea551cd85f2eb2a807613752ab997b9974aaa0d56936"}, + {file = "pillow-10.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dc1a390a82755a8c26c9964d457d4c9cbec5405896cba94cf51f36ea0d855002"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4203efca580f0dd6f882ca211f923168548f7ba334c189e9eab1178ab840bf60"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3102045a10945173d38336f6e71a8dc71bcaeed55c3123ad4af82c52807b9375"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:6fb1b30043271ec92dc65f6d9f0b7a830c210b8a96423074b15c7bc999975f57"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:1dfc94946bc60ea375cc39cff0b8da6c7e5f8fcdc1d946beb8da5c216156ddd8"}, + {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b09b86b27a064c9624d0a6c54da01c1beaf5b6cadfa609cf63789b1d08a797b9"}, + {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d3b2348a78bc939b4fed6552abfd2e7988e0f81443ef3911a4b8498ca084f6eb"}, + {file = "pillow-10.3.0-cp39-cp39-win32.whl", hash = "sha256:45ebc7b45406febf07fef35d856f0293a92e7417ae7933207e90bf9090b70572"}, + {file = "pillow-10.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:0ba26351b137ca4e0db0342d5d00d2e355eb29372c05afd544ebf47c0956ffeb"}, + {file = "pillow-10.3.0-cp39-cp39-win_arm64.whl", hash = "sha256:50fd3f6b26e3441ae07b7c979309638b72abc1a25da31a81a7fbd9495713ef4f"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:6b02471b72526ab8a18c39cb7967b72d194ec53c1fd0a70b050565a0f366d355"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:8ab74c06ffdab957d7670c2a5a6e1a70181cd10b727cd788c4dd9005b6a8acd9"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:048eeade4c33fdf7e08da40ef402e748df113fd0b4584e32c4af74fe78baaeb2"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e2ec1e921fd07c7cda7962bad283acc2f2a9ccc1b971ee4b216b75fad6f0463"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:4c8e73e99da7db1b4cad7f8d682cf6abad7844da39834c288fbfa394a47bbced"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:16563993329b79513f59142a6b02055e10514c1a8e86dca8b48a893e33cf91e3"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:dd78700f5788ae180b5ee8902c6aea5a5726bac7c364b202b4b3e3ba2d293170"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:aff76a55a8aa8364d25400a210a65ff59d0168e0b4285ba6bf2bd83cf675ba32"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:b7bc2176354defba3edc2b9a777744462da2f8e921fbaf61e52acb95bafa9828"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:793b4e24db2e8742ca6423d3fde8396db336698c55cd34b660663ee9e45ed37f"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d93480005693d247f8346bc8ee28c72a2191bdf1f6b5db469c096c0c867ac015"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c83341b89884e2b2e55886e8fbbf37c3fa5efd6c8907124aeb72f285ae5696e5"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1a1d1915db1a4fdb2754b9de292642a39a7fb28f1736699527bb649484fb966a"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a0eaa93d054751ee9964afa21c06247779b90440ca41d184aeb5d410f20ff591"}, + {file = "pillow-10.3.0.tar.gz", hash = "sha256:9d2455fbf44c914840c793e89aa82d0e1763a14253a000743719ae5946814b2d"}, ] [package.extras] @@ -1608,29 +1609,29 @@ tests = ["pytest"] [[package]] name = "pycparser" -version = "2.21" +version = "2.22" description = "C parser in Python" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.8" files = [ - {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, - {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, + {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, + {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, ] [[package]] name = "pydantic" -version = "2.6.1" +version = "2.7.0" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.6.1-py3-none-any.whl", hash = "sha256:0b6a909df3192245cb736509a92ff69e4fef76116feffec68e93a567347bae6f"}, - {file = "pydantic-2.6.1.tar.gz", hash = "sha256:4fd5c182a2488dc63e6d32737ff19937888001e2a6d86e94b3f233104a5d1fa9"}, + {file = "pydantic-2.7.0-py3-none-any.whl", hash = "sha256:9dee74a271705f14f9a1567671d144a851c675b072736f0a7b2608fd9e495352"}, + {file = "pydantic-2.7.0.tar.gz", hash = "sha256:b5ecdd42262ca2462e2624793551e80911a1e989f462910bb81aef974b4bb383"}, ] [package.dependencies] annotated-types = ">=0.4.0" -pydantic-core = "2.16.2" +pydantic-core = "2.18.1" typing-extensions = ">=4.6.1" [package.extras] @@ -1638,90 +1639,90 @@ email = ["email-validator (>=2.0.0)"] [[package]] name = "pydantic-core" -version = "2.16.2" -description = "" +version = "2.18.1" +description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.16.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3fab4e75b8c525a4776e7630b9ee48aea50107fea6ca9f593c98da3f4d11bf7c"}, - {file = "pydantic_core-2.16.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8bde5b48c65b8e807409e6f20baee5d2cd880e0fad00b1a811ebc43e39a00ab2"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2924b89b16420712e9bb8192396026a8fbd6d8726224f918353ac19c4c043d2a"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:16aa02e7a0f539098e215fc193c8926c897175d64c7926d00a36188917717a05"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:936a787f83db1f2115ee829dd615c4f684ee48ac4de5779ab4300994d8af325b"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:459d6be6134ce3b38e0ef76f8a672924460c455d45f1ad8fdade36796df1ddc8"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f9ee4febb249c591d07b2d4dd36ebcad0ccd128962aaa1801508320896575ef"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:40a0bd0bed96dae5712dab2aba7d334a6c67cbcac2ddfca7dbcc4a8176445990"}, - {file = "pydantic_core-2.16.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:870dbfa94de9b8866b37b867a2cb37a60c401d9deb4a9ea392abf11a1f98037b"}, - {file = "pydantic_core-2.16.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:308974fdf98046db28440eb3377abba274808bf66262e042c412eb2adf852731"}, - {file = "pydantic_core-2.16.2-cp310-none-win32.whl", hash = "sha256:a477932664d9611d7a0816cc3c0eb1f8856f8a42435488280dfbf4395e141485"}, - {file = "pydantic_core-2.16.2-cp310-none-win_amd64.whl", hash = "sha256:8f9142a6ed83d90c94a3efd7af8873bf7cefed2d3d44387bf848888482e2d25f"}, - {file = "pydantic_core-2.16.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:406fac1d09edc613020ce9cf3f2ccf1a1b2f57ab00552b4c18e3d5276c67eb11"}, - {file = "pydantic_core-2.16.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ce232a6170dd6532096cadbf6185271e4e8c70fc9217ebe105923ac105da9978"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a90fec23b4b05a09ad988e7a4f4e081711a90eb2a55b9c984d8b74597599180f"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8aafeedb6597a163a9c9727d8a8bd363a93277701b7bfd2749fbefee2396469e"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9957433c3a1b67bdd4c63717eaf174ebb749510d5ea612cd4e83f2d9142f3fc8"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0d7a9165167269758145756db43a133608a531b1e5bb6a626b9ee24bc38a8f7"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dffaf740fe2e147fedcb6b561353a16243e654f7fe8e701b1b9db148242e1272"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f8ed79883b4328b7f0bd142733d99c8e6b22703e908ec63d930b06be3a0e7113"}, - {file = "pydantic_core-2.16.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:cf903310a34e14651c9de056fcc12ce090560864d5a2bb0174b971685684e1d8"}, - {file = "pydantic_core-2.16.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:46b0d5520dbcafea9a8645a8164658777686c5c524d381d983317d29687cce97"}, - {file = "pydantic_core-2.16.2-cp311-none-win32.whl", hash = "sha256:70651ff6e663428cea902dac297066d5c6e5423fda345a4ca62430575364d62b"}, - {file = "pydantic_core-2.16.2-cp311-none-win_amd64.whl", hash = "sha256:98dc6f4f2095fc7ad277782a7c2c88296badcad92316b5a6e530930b1d475ebc"}, - {file = "pydantic_core-2.16.2-cp311-none-win_arm64.whl", hash = "sha256:ef6113cd31411eaf9b39fc5a8848e71c72656fd418882488598758b2c8c6dfa0"}, - {file = "pydantic_core-2.16.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:88646cae28eb1dd5cd1e09605680c2b043b64d7481cdad7f5003ebef401a3039"}, - {file = "pydantic_core-2.16.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7b883af50eaa6bb3299780651e5be921e88050ccf00e3e583b1e92020333304b"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bf26c2e2ea59d32807081ad51968133af3025c4ba5753e6a794683d2c91bf6e"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:99af961d72ac731aae2a1b55ccbdae0733d816f8bfb97b41909e143de735f522"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:02906e7306cb8c5901a1feb61f9ab5e5c690dbbeaa04d84c1b9ae2a01ebe9379"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5362d099c244a2d2f9659fb3c9db7c735f0004765bbe06b99be69fbd87c3f15"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ac426704840877a285d03a445e162eb258924f014e2f074e209d9b4ff7bf380"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b94cbda27267423411c928208e89adddf2ea5dd5f74b9528513f0358bba019cb"}, - {file = "pydantic_core-2.16.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:6db58c22ac6c81aeac33912fb1af0e930bc9774166cdd56eade913d5f2fff35e"}, - {file = "pydantic_core-2.16.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:396fdf88b1b503c9c59c84a08b6833ec0c3b5ad1a83230252a9e17b7dfb4cffc"}, - {file = "pydantic_core-2.16.2-cp312-none-win32.whl", hash = "sha256:7c31669e0c8cc68400ef0c730c3a1e11317ba76b892deeefaf52dcb41d56ed5d"}, - {file = "pydantic_core-2.16.2-cp312-none-win_amd64.whl", hash = "sha256:a3b7352b48fbc8b446b75f3069124e87f599d25afb8baa96a550256c031bb890"}, - {file = "pydantic_core-2.16.2-cp312-none-win_arm64.whl", hash = "sha256:a9e523474998fb33f7c1a4d55f5504c908d57add624599e095c20fa575b8d943"}, - {file = "pydantic_core-2.16.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:ae34418b6b389d601b31153b84dce480351a352e0bb763684a1b993d6be30f17"}, - {file = "pydantic_core-2.16.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:732bd062c9e5d9582a30e8751461c1917dd1ccbdd6cafb032f02c86b20d2e7ec"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b52776a2e3230f4854907a1e0946eec04d41b1fc64069ee774876bbe0eab55"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ef551c053692b1e39e3f7950ce2296536728871110e7d75c4e7753fb30ca87f4"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ebb892ed8599b23fa8f1799e13a12c87a97a6c9d0f497525ce9858564c4575a4"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aa6c8c582036275997a733427b88031a32ffa5dfc3124dc25a730658c47a572f"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4ba0884a91f1aecce75202473ab138724aa4fb26d7707f2e1fa6c3e68c84fbf"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7924e54f7ce5d253d6160090ddc6df25ed2feea25bfb3339b424a9dd591688bc"}, - {file = "pydantic_core-2.16.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69a7b96b59322a81c2203be537957313b07dd333105b73db0b69212c7d867b4b"}, - {file = "pydantic_core-2.16.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7e6231aa5bdacda78e96ad7b07d0c312f34ba35d717115f4b4bff6cb87224f0f"}, - {file = "pydantic_core-2.16.2-cp38-none-win32.whl", hash = "sha256:41dac3b9fce187a25c6253ec79a3f9e2a7e761eb08690e90415069ea4a68ff7a"}, - {file = "pydantic_core-2.16.2-cp38-none-win_amd64.whl", hash = "sha256:f685dbc1fdadb1dcd5b5e51e0a378d4685a891b2ddaf8e2bba89bd3a7144e44a"}, - {file = "pydantic_core-2.16.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:55749f745ebf154c0d63d46c8c58594d8894b161928aa41adbb0709c1fe78b77"}, - {file = "pydantic_core-2.16.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b30b0dd58a4509c3bd7eefddf6338565c4905406aee0c6e4a5293841411a1286"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18de31781cdc7e7b28678df7c2d7882f9692ad060bc6ee3c94eb15a5d733f8f7"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5864b0242f74b9dd0b78fd39db1768bc3f00d1ffc14e596fd3e3f2ce43436a33"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8f9186ca45aee030dc8234118b9c0784ad91a0bb27fc4e7d9d6608a5e3d386c"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc6f6c9be0ab6da37bc77c2dda5f14b1d532d5dbef00311ee6e13357a418e646"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa057095f621dad24a1e906747179a69780ef45cc8f69e97463692adbcdae878"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6ad84731a26bcfb299f9eab56c7932d46f9cad51c52768cace09e92a19e4cf55"}, - {file = "pydantic_core-2.16.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3b052c753c4babf2d1edc034c97851f867c87d6f3ea63a12e2700f159f5c41c3"}, - {file = "pydantic_core-2.16.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e0f686549e32ccdb02ae6f25eee40cc33900910085de6aa3790effd391ae10c2"}, - {file = "pydantic_core-2.16.2-cp39-none-win32.whl", hash = "sha256:7afb844041e707ac9ad9acad2188a90bffce2c770e6dc2318be0c9916aef1469"}, - {file = "pydantic_core-2.16.2-cp39-none-win_amd64.whl", hash = "sha256:9da90d393a8227d717c19f5397688a38635afec89f2e2d7af0df037f3249c39a"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5f60f920691a620b03082692c378661947d09415743e437a7478c309eb0e4f82"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:47924039e785a04d4a4fa49455e51b4eb3422d6eaacfde9fc9abf8fdef164e8a"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e6294e76b0380bb7a61eb8a39273c40b20beb35e8c87ee101062834ced19c545"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe56851c3f1d6f5384b3051c536cc81b3a93a73faf931f404fef95217cf1e10d"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9d776d30cde7e541b8180103c3f294ef7c1862fd45d81738d156d00551005784"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:72f7919af5de5ecfaf1eba47bf9a5d8aa089a3340277276e5636d16ee97614d7"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:4bfcbde6e06c56b30668a0c872d75a7ef3025dc3c1823a13cf29a0e9b33f67e8"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ff7c97eb7a29aba230389a2661edf2e9e06ce616c7e35aa764879b6894a44b25"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:9b5f13857da99325dcabe1cc4e9e6a3d7b2e2c726248ba5dd4be3e8e4a0b6d0e"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:a7e41e3ada4cca5f22b478c08e973c930e5e6c7ba3588fb8e35f2398cdcc1545"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:60eb8ceaa40a41540b9acae6ae7c1f0a67d233c40dc4359c256ad2ad85bdf5e5"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7beec26729d496a12fd23cf8da9944ee338c8b8a17035a560b585c36fe81af20"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:22c5f022799f3cd6741e24f0443ead92ef42be93ffda0d29b2597208c94c3753"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:eca58e319f4fd6df004762419612122b2c7e7d95ffafc37e890252f869f3fb2a"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ed957db4c33bc99895f3a1672eca7e80e8cda8bd1e29a80536b4ec2153fa9804"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:459c0d338cc55d099798618f714b21b7ece17eb1a87879f2da20a3ff4c7628e2"}, - {file = "pydantic_core-2.16.2.tar.gz", hash = "sha256:0ba503850d8b8dcc18391f10de896ae51d37fe5fe43dbfb6a35c5c5cad271a06"}, + {file = "pydantic_core-2.18.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:ee9cf33e7fe14243f5ca6977658eb7d1042caaa66847daacbd2117adb258b226"}, + {file = "pydantic_core-2.18.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6b7bbb97d82659ac8b37450c60ff2e9f97e4eb0f8a8a3645a5568b9334b08b50"}, + {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df4249b579e75094f7e9bb4bd28231acf55e308bf686b952f43100a5a0be394c"}, + {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d0491006a6ad20507aec2be72e7831a42efc93193d2402018007ff827dc62926"}, + {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2ae80f72bb7a3e397ab37b53a2b49c62cc5496412e71bc4f1277620a7ce3f52b"}, + {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:58aca931bef83217fca7a390e0486ae327c4af9c3e941adb75f8772f8eeb03a1"}, + {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1be91ad664fc9245404a789d60cba1e91c26b1454ba136d2a1bf0c2ac0c0505a"}, + {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:667880321e916a8920ef49f5d50e7983792cf59f3b6079f3c9dac2b88a311d17"}, + {file = "pydantic_core-2.18.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:f7054fdc556f5421f01e39cbb767d5ec5c1139ea98c3e5b350e02e62201740c7"}, + {file = "pydantic_core-2.18.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:030e4f9516f9947f38179249778709a460a3adb516bf39b5eb9066fcfe43d0e6"}, + {file = "pydantic_core-2.18.1-cp310-none-win32.whl", hash = "sha256:2e91711e36e229978d92642bfc3546333a9127ecebb3f2761372e096395fc649"}, + {file = "pydantic_core-2.18.1-cp310-none-win_amd64.whl", hash = "sha256:9a29726f91c6cb390b3c2338f0df5cd3e216ad7a938762d11c994bb37552edb0"}, + {file = "pydantic_core-2.18.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:9ece8a49696669d483d206b4474c367852c44815fca23ac4e48b72b339807f80"}, + {file = "pydantic_core-2.18.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7a5d83efc109ceddb99abd2c1316298ced2adb4570410defe766851a804fcd5b"}, + {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f7973c381283783cd1043a8c8f61ea5ce7a3a58b0369f0ee0ee975eaf2f2a1b"}, + {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:54c7375c62190a7845091f521add19b0f026bcf6ae674bdb89f296972272e86d"}, + {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dd63cec4e26e790b70544ae5cc48d11b515b09e05fdd5eff12e3195f54b8a586"}, + {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:561cf62c8a3498406495cfc49eee086ed2bb186d08bcc65812b75fda42c38294"}, + {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68717c38a68e37af87c4da20e08f3e27d7e4212e99e96c3d875fbf3f4812abfc"}, + {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2d5728e93d28a3c63ee513d9ffbac9c5989de8c76e049dbcb5bfe4b923a9739d"}, + {file = "pydantic_core-2.18.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f0f17814c505f07806e22b28856c59ac80cee7dd0fbb152aed273e116378f519"}, + {file = "pydantic_core-2.18.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d816f44a51ba5175394bc6c7879ca0bd2be560b2c9e9f3411ef3a4cbe644c2e9"}, + {file = "pydantic_core-2.18.1-cp311-none-win32.whl", hash = "sha256:09f03dfc0ef8c22622eaa8608caa4a1e189cfb83ce847045eca34f690895eccb"}, + {file = "pydantic_core-2.18.1-cp311-none-win_amd64.whl", hash = "sha256:27f1009dc292f3b7ca77feb3571c537276b9aad5dd4efb471ac88a8bd09024e9"}, + {file = "pydantic_core-2.18.1-cp311-none-win_arm64.whl", hash = "sha256:48dd883db92e92519201f2b01cafa881e5f7125666141a49ffba8b9facc072b0"}, + {file = "pydantic_core-2.18.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:b6b0e4912030c6f28bcb72b9ebe4989d6dc2eebcd2a9cdc35fefc38052dd4fe8"}, + {file = "pydantic_core-2.18.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f3202a429fe825b699c57892d4371c74cc3456d8d71b7f35d6028c96dfecad31"}, + {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a3982b0a32d0a88b3907e4b0dc36809fda477f0757c59a505d4e9b455f384b8b"}, + {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25595ac311f20e5324d1941909b0d12933f1fd2171075fcff763e90f43e92a0d"}, + {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:14fe73881cf8e4cbdaded8ca0aa671635b597e42447fec7060d0868b52d074e6"}, + {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ca976884ce34070799e4dfc6fbd68cb1d181db1eefe4a3a94798ddfb34b8867f"}, + {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:684d840d2c9ec5de9cb397fcb3f36d5ebb6fa0d94734f9886032dd796c1ead06"}, + {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:54764c083bbe0264f0f746cefcded6cb08fbbaaf1ad1d78fb8a4c30cff999a90"}, + {file = "pydantic_core-2.18.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:201713f2f462e5c015b343e86e68bd8a530a4f76609b33d8f0ec65d2b921712a"}, + {file = "pydantic_core-2.18.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fd1a9edb9dd9d79fbeac1ea1f9a8dd527a6113b18d2e9bcc0d541d308dae639b"}, + {file = "pydantic_core-2.18.1-cp312-none-win32.whl", hash = "sha256:d5e6b7155b8197b329dc787356cfd2684c9d6a6b1a197f6bbf45f5555a98d411"}, + {file = "pydantic_core-2.18.1-cp312-none-win_amd64.whl", hash = "sha256:9376d83d686ec62e8b19c0ac3bf8d28d8a5981d0df290196fb6ef24d8a26f0d6"}, + {file = "pydantic_core-2.18.1-cp312-none-win_arm64.whl", hash = "sha256:c562b49c96906b4029b5685075fe1ebd3b5cc2601dfa0b9e16c2c09d6cbce048"}, + {file = "pydantic_core-2.18.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:3e352f0191d99fe617371096845070dee295444979efb8f27ad941227de6ad09"}, + {file = "pydantic_core-2.18.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c0295d52b012cbe0d3059b1dba99159c3be55e632aae1999ab74ae2bd86a33d7"}, + {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:56823a92075780582d1ffd4489a2e61d56fd3ebb4b40b713d63f96dd92d28144"}, + {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:dd3f79e17b56741b5177bcc36307750d50ea0698df6aa82f69c7db32d968c1c2"}, + {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:38a5024de321d672a132b1834a66eeb7931959c59964b777e8f32dbe9523f6b1"}, + {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d2ce426ee691319d4767748c8e0895cfc56593d725594e415f274059bcf3cb76"}, + {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2adaeea59849ec0939af5c5d476935f2bab4b7f0335b0110f0f069a41024278e"}, + {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9b6431559676a1079eac0f52d6d0721fb8e3c5ba43c37bc537c8c83724031feb"}, + {file = "pydantic_core-2.18.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:85233abb44bc18d16e72dc05bf13848a36f363f83757541f1a97db2f8d58cfd9"}, + {file = "pydantic_core-2.18.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:641a018af4fe48be57a2b3d7a1f0f5dbca07c1d00951d3d7463f0ac9dac66622"}, + {file = "pydantic_core-2.18.1-cp38-none-win32.whl", hash = "sha256:63d7523cd95d2fde0d28dc42968ac731b5bb1e516cc56b93a50ab293f4daeaad"}, + {file = "pydantic_core-2.18.1-cp38-none-win_amd64.whl", hash = "sha256:907a4d7720abfcb1c81619863efd47c8a85d26a257a2dbebdb87c3b847df0278"}, + {file = "pydantic_core-2.18.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:aad17e462f42ddbef5984d70c40bfc4146c322a2da79715932cd8976317054de"}, + {file = "pydantic_core-2.18.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:94b9769ba435b598b547c762184bcfc4783d0d4c7771b04a3b45775c3589ca44"}, + {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80e0e57cc704a52fb1b48f16d5b2c8818da087dbee6f98d9bf19546930dc64b5"}, + {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:76b86e24039c35280ceee6dce7e62945eb93a5175d43689ba98360ab31eebc4a"}, + {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12a05db5013ec0ca4a32cc6433f53faa2a014ec364031408540ba858c2172bb0"}, + {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:250ae39445cb5475e483a36b1061af1bc233de3e9ad0f4f76a71b66231b07f88"}, + {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a32204489259786a923e02990249c65b0f17235073149d0033efcebe80095570"}, + {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6395a4435fa26519fd96fdccb77e9d00ddae9dd6c742309bd0b5610609ad7fb2"}, + {file = "pydantic_core-2.18.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2533ad2883f001efa72f3d0e733fb846710c3af6dcdd544fe5bf14fa5fe2d7db"}, + {file = "pydantic_core-2.18.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b560b72ed4816aee52783c66854d96157fd8175631f01ef58e894cc57c84f0f6"}, + {file = "pydantic_core-2.18.1-cp39-none-win32.whl", hash = "sha256:582cf2cead97c9e382a7f4d3b744cf0ef1a6e815e44d3aa81af3ad98762f5a9b"}, + {file = "pydantic_core-2.18.1-cp39-none-win_amd64.whl", hash = "sha256:ca71d501629d1fa50ea7fa3b08ba884fe10cefc559f5c6c8dfe9036c16e8ae89"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:e178e5b66a06ec5bf51668ec0d4ac8cfb2bdcb553b2c207d58148340efd00143"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:72722ce529a76a4637a60be18bd789d8fb871e84472490ed7ddff62d5fed620d"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2fe0c1ce5b129455e43f941f7a46f61f3d3861e571f2905d55cdbb8b5c6f5e2c"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4284c621f06a72ce2cb55f74ea3150113d926a6eb78ab38340c08f770eb9b4d"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a0c3e718f4e064efde68092d9d974e39572c14e56726ecfaeebbe6544521f47"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:2027493cc44c23b598cfaf200936110433d9caa84e2c6cf487a83999638a96ac"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:76909849d1a6bffa5a07742294f3fa1d357dc917cb1fe7b470afbc3a7579d539"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ee7ccc7fb7e921d767f853b47814c3048c7de536663e82fbc37f5eb0d532224b"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ee2794111c188548a4547eccc73a6a8527fe2af6cf25e1a4ebda2fd01cdd2e60"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:a139fe9f298dc097349fb4f28c8b81cc7a202dbfba66af0e14be5cfca4ef7ce5"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d074b07a10c391fc5bbdcb37b2f16f20fcd9e51e10d01652ab298c0d07908ee2"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c69567ddbac186e8c0aadc1f324a60a564cfe25e43ef2ce81bcc4b8c3abffbae"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:baf1c7b78cddb5af00971ad5294a4583188bda1495b13760d9f03c9483bb6203"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:2684a94fdfd1b146ff10689c6e4e815f6a01141781c493b97342cdc5b06f4d5d"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:73c1bc8a86a5c9e8721a088df234265317692d0b5cd9e86e975ce3bc3db62a59"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:e60defc3c15defb70bb38dd605ff7e0fae5f6c9c7cbfe0ad7868582cb7e844a6"}, + {file = "pydantic_core-2.18.1.tar.gz", hash = "sha256:de9d3e8717560eb05e28739d1b35e4eac2e458553a52a301e51352a7ffc86a35"}, ] [package.dependencies] @@ -1744,13 +1745,13 @@ windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pytest" -version = "8.0.1" +version = "8.1.1" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.0.1-py3-none-any.whl", hash = "sha256:3e4f16fe1c0a9dc9d9389161c127c3edc5d810c38d6793042fb81d9f48a59fca"}, - {file = "pytest-8.0.1.tar.gz", hash = "sha256:267f6563751877d772019b13aacbe4e860d73fe8f651f28112e9ac37de7513ae"}, + {file = "pytest-8.1.1-py3-none-any.whl", hash = "sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7"}, + {file = "pytest-8.1.1.tar.gz", hash = "sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044"}, ] [package.dependencies] @@ -1758,21 +1759,21 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.3.0,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +pluggy = ">=1.4,<2.0" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +testing = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "python-dateutil" -version = "2.8.2" +version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ - {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, - {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, + {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, + {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, ] [package.dependencies] @@ -1837,7 +1838,6 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -2113,59 +2113,71 @@ files = [ [[package]] name = "sniffio" -version = "1.3.0" +version = "1.3.1" description = "Sniff out which async library your code is running under" optional = false python-versions = ">=3.7" files = [ - {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, - {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, + {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, + {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, ] [[package]] name = "sqlalchemy" -version = "2.0.27" +version = "2.0.29" description = "Database Abstraction Library" optional = false python-versions = ">=3.7" files = [ - {file = "SQLAlchemy-2.0.27-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d04e579e911562f1055d26dab1868d3e0bb905db3bccf664ee8ad109f035618a"}, - {file = "SQLAlchemy-2.0.27-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fa67d821c1fd268a5a87922ef4940442513b4e6c377553506b9db3b83beebbd8"}, - {file = "SQLAlchemy-2.0.27-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:954d9735ee9c3fa74874c830d089a815b7b48df6f6b6e357a74130e478dbd951"}, - {file = "SQLAlchemy-2.0.27-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:03f448ffb731b48323bda68bcc93152f751436ad6037f18a42b7e16af9e91c07"}, - {file = "SQLAlchemy-2.0.27-cp310-cp310-win32.whl", hash = "sha256:d997c5938a08b5e172c30583ba6b8aad657ed9901fc24caf3a7152eeccb2f1b4"}, - {file = "SQLAlchemy-2.0.27-cp310-cp310-win_amd64.whl", hash = "sha256:eb15ef40b833f5b2f19eeae65d65e191f039e71790dd565c2af2a3783f72262f"}, - {file = "SQLAlchemy-2.0.27-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6c5bad7c60a392850d2f0fee8f355953abaec878c483dd7c3836e0089f046bf6"}, - {file = "SQLAlchemy-2.0.27-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a3012ab65ea42de1be81fff5fb28d6db893ef978950afc8130ba707179b4284a"}, - {file = "SQLAlchemy-2.0.27-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d177b7e82f6dd5e1aebd24d9c3297c70ce09cd1d5d37b43e53f39514379c029c"}, - {file = "SQLAlchemy-2.0.27-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1306102f6d9e625cebaca3d4c9c8f10588735ef877f0360b5cdb4fdfd3fd7131"}, - {file = "SQLAlchemy-2.0.27-cp311-cp311-win32.whl", hash = "sha256:5b78aa9f4f68212248aaf8943d84c0ff0f74efc65a661c2fc68b82d498311fd5"}, - {file = "SQLAlchemy-2.0.27-cp311-cp311-win_amd64.whl", hash = "sha256:15e19a84b84528f52a68143439d0c7a3a69befcd4f50b8ef9b7b69d2628ae7c4"}, - {file = "SQLAlchemy-2.0.27-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:0de1263aac858f288a80b2071990f02082c51d88335a1db0d589237a3435fe71"}, - {file = "SQLAlchemy-2.0.27-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce850db091bf7d2a1f2fdb615220b968aeff3849007b1204bf6e3e50a57b3d32"}, - {file = "SQLAlchemy-2.0.27-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4fbe6a766301f2e8a4519f4500fe74ef0a8509a59e07a4085458f26228cd7cc"}, - {file = "SQLAlchemy-2.0.27-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:0fb3bffc0ced37e5aa4ac2416f56d6d858f46d4da70c09bb731a246e70bff4d5"}, - {file = "SQLAlchemy-2.0.27-cp312-cp312-win32.whl", hash = "sha256:7f470327d06400a0aa7926b375b8e8c3c31d335e0884f509fe272b3c700a7254"}, - {file = "SQLAlchemy-2.0.27-cp312-cp312-win_amd64.whl", hash = "sha256:f9374e270e2553653d710ece397df67db9d19c60d2647bcd35bfc616f1622dcd"}, - {file = "SQLAlchemy-2.0.27-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e97cf143d74a7a5a0f143aa34039b4fecf11343eed66538610debc438685db4a"}, - {file = "SQLAlchemy-2.0.27-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e36aa62b765cf9f43a003233a8c2d7ffdeb55bc62eaa0a0380475b228663a38f"}, - {file = "SQLAlchemy-2.0.27-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:b1d9d1bfd96eef3c3faedb73f486c89e44e64e40e5bfec304ee163de01cf996f"}, - {file = "SQLAlchemy-2.0.27-cp37-cp37m-win32.whl", hash = "sha256:ca891af9f3289d24a490a5fde664ea04fe2f4984cd97e26de7442a4251bd4b7c"}, - {file = "SQLAlchemy-2.0.27-cp37-cp37m-win_amd64.whl", hash = "sha256:fd8aafda7cdff03b905d4426b714601c0978725a19efc39f5f207b86d188ba01"}, - {file = "SQLAlchemy-2.0.27-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ec1f5a328464daf7a1e4e385e4f5652dd9b1d12405075ccba1df842f7774b4fc"}, - {file = "SQLAlchemy-2.0.27-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ad862295ad3f644e3c2c0d8b10a988e1600d3123ecb48702d2c0f26771f1c396"}, - {file = "SQLAlchemy-2.0.27-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e56afce6431450442f3ab5973156289bd5ec33dd618941283847c9fd5ff06bf"}, - {file = "SQLAlchemy-2.0.27-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b86abba762ecfeea359112b2bb4490802b340850bbee1948f785141a5e020de8"}, - {file = "SQLAlchemy-2.0.27-cp38-cp38-win32.whl", hash = "sha256:30d81cc1192dc693d49d5671cd40cdec596b885b0ce3b72f323888ab1c3863d5"}, - {file = "SQLAlchemy-2.0.27-cp38-cp38-win_amd64.whl", hash = "sha256:120af1e49d614d2525ac247f6123841589b029c318b9afbfc9e2b70e22e1827d"}, - {file = "SQLAlchemy-2.0.27-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d07ee7793f2aeb9b80ec8ceb96bc8cc08a2aec8a1b152da1955d64e4825fcbac"}, - {file = "SQLAlchemy-2.0.27-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:cb0845e934647232b6ff5150df37ceffd0b67b754b9fdbb095233deebcddbd4a"}, - {file = "SQLAlchemy-2.0.27-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b90053be91973a6fb6020a6e44382c97739736a5a9d74e08cc29b196639eb979"}, - {file = "SQLAlchemy-2.0.27-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:33e8bde8fff203de50399b9039c4e14e42d4d227759155c21f8da4a47fc8053c"}, - {file = "SQLAlchemy-2.0.27-cp39-cp39-win32.whl", hash = "sha256:d873c21b356bfaf1589b89090a4011e6532582b3a8ea568a00e0c3aab09399dd"}, - {file = "SQLAlchemy-2.0.27-cp39-cp39-win_amd64.whl", hash = "sha256:ff2f1b7c963961d41403b650842dc2039175b906ab2093635d8319bef0b7d620"}, - {file = "SQLAlchemy-2.0.27-py3-none-any.whl", hash = "sha256:1ab4e0448018d01b142c916cc7119ca573803a4745cfe341b8f95657812700ac"}, - {file = "SQLAlchemy-2.0.27.tar.gz", hash = "sha256:86a6ed69a71fe6b88bf9331594fa390a2adda4a49b5c06f98e47bf0d392534f8"}, + {file = "SQLAlchemy-2.0.29-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4c142852ae192e9fe5aad5c350ea6befe9db14370b34047e1f0f7cf99e63c63b"}, + {file = "SQLAlchemy-2.0.29-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:99a1e69d4e26f71e750e9ad6fdc8614fbddb67cfe2173a3628a2566034e223c7"}, + {file = "SQLAlchemy-2.0.29-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5ef3fbccb4058355053c51b82fd3501a6e13dd808c8d8cd2561e610c5456013c"}, + {file = "SQLAlchemy-2.0.29-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d6753305936eddc8ed190e006b7bb33a8f50b9854823485eed3a886857ab8d1"}, + {file = "SQLAlchemy-2.0.29-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0f3ca96af060a5250a8ad5a63699180bc780c2edf8abf96c58af175921df847a"}, + {file = "SQLAlchemy-2.0.29-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c4520047006b1d3f0d89e0532978c0688219857eb2fee7c48052560ae76aca1e"}, + {file = "SQLAlchemy-2.0.29-cp310-cp310-win32.whl", hash = "sha256:b2a0e3cf0caac2085ff172c3faacd1e00c376e6884b5bc4dd5b6b84623e29e4f"}, + {file = "SQLAlchemy-2.0.29-cp310-cp310-win_amd64.whl", hash = "sha256:01d10638a37460616708062a40c7b55f73e4d35eaa146781c683e0fa7f6c43fb"}, + {file = "SQLAlchemy-2.0.29-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:308ef9cb41d099099fffc9d35781638986870b29f744382904bf9c7dadd08513"}, + {file = "SQLAlchemy-2.0.29-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:296195df68326a48385e7a96e877bc19aa210e485fa381c5246bc0234c36c78e"}, + {file = "SQLAlchemy-2.0.29-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a13b917b4ffe5a0a31b83d051d60477819ddf18276852ea68037a144a506efb9"}, + {file = "SQLAlchemy-2.0.29-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f6d971255d9ddbd3189e2e79d743ff4845c07f0633adfd1de3f63d930dbe673"}, + {file = "SQLAlchemy-2.0.29-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:61405ea2d563407d316c63a7b5271ae5d274a2a9fbcd01b0aa5503635699fa1e"}, + {file = "SQLAlchemy-2.0.29-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:de7202ffe4d4a8c1e3cde1c03e01c1a3772c92858837e8f3879b497158e4cb44"}, + {file = "SQLAlchemy-2.0.29-cp311-cp311-win32.whl", hash = "sha256:b5d7ed79df55a731749ce65ec20d666d82b185fa4898430b17cb90c892741520"}, + {file = "SQLAlchemy-2.0.29-cp311-cp311-win_amd64.whl", hash = "sha256:205f5a2b39d7c380cbc3b5dcc8f2762fb5bcb716838e2d26ccbc54330775b003"}, + {file = "SQLAlchemy-2.0.29-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d96710d834a6fb31e21381c6d7b76ec729bd08c75a25a5184b1089141356171f"}, + {file = "SQLAlchemy-2.0.29-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:52de4736404e53c5c6a91ef2698c01e52333988ebdc218f14c833237a0804f1b"}, + {file = "SQLAlchemy-2.0.29-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c7b02525ede2a164c5fa5014915ba3591730f2cc831f5be9ff3b7fd3e30958e"}, + {file = "SQLAlchemy-2.0.29-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0dfefdb3e54cd15f5d56fd5ae32f1da2d95d78319c1f6dfb9bcd0eb15d603d5d"}, + {file = "SQLAlchemy-2.0.29-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:a88913000da9205b13f6f195f0813b6ffd8a0c0c2bd58d499e00a30eb508870c"}, + {file = "SQLAlchemy-2.0.29-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fecd5089c4be1bcc37c35e9aa678938d2888845a134dd016de457b942cf5a758"}, + {file = "SQLAlchemy-2.0.29-cp312-cp312-win32.whl", hash = "sha256:8197d6f7a3d2b468861ebb4c9f998b9df9e358d6e1cf9c2a01061cb9b6cf4e41"}, + {file = "SQLAlchemy-2.0.29-cp312-cp312-win_amd64.whl", hash = "sha256:9b19836ccca0d321e237560e475fd99c3d8655d03da80c845c4da20dda31b6e1"}, + {file = "SQLAlchemy-2.0.29-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:87a1d53a5382cdbbf4b7619f107cc862c1b0a4feb29000922db72e5a66a5ffc0"}, + {file = "SQLAlchemy-2.0.29-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a0732dffe32333211801b28339d2a0babc1971bc90a983e3035e7b0d6f06b93"}, + {file = "SQLAlchemy-2.0.29-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90453597a753322d6aa770c5935887ab1fc49cc4c4fdd436901308383d698b4b"}, + {file = "SQLAlchemy-2.0.29-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ea311d4ee9a8fa67f139c088ae9f905fcf0277d6cd75c310a21a88bf85e130f5"}, + {file = "SQLAlchemy-2.0.29-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:5f20cb0a63a3e0ec4e169aa8890e32b949c8145983afa13a708bc4b0a1f30e03"}, + {file = "SQLAlchemy-2.0.29-cp37-cp37m-win32.whl", hash = "sha256:e5bbe55e8552019c6463709b39634a5fc55e080d0827e2a3a11e18eb73f5cdbd"}, + {file = "SQLAlchemy-2.0.29-cp37-cp37m-win_amd64.whl", hash = "sha256:c2f9c762a2735600654c654bf48dad388b888f8ce387b095806480e6e4ff6907"}, + {file = "SQLAlchemy-2.0.29-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7e614d7a25a43a9f54fcce4675c12761b248547f3d41b195e8010ca7297c369c"}, + {file = "SQLAlchemy-2.0.29-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:471fcb39c6adf37f820350c28aac4a7df9d3940c6548b624a642852e727ea586"}, + {file = "SQLAlchemy-2.0.29-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:988569c8732f54ad3234cf9c561364221a9e943b78dc7a4aaf35ccc2265f1930"}, + {file = "SQLAlchemy-2.0.29-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dddaae9b81c88083e6437de95c41e86823d150f4ee94bf24e158a4526cbead01"}, + {file = "SQLAlchemy-2.0.29-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:334184d1ab8f4c87f9652b048af3f7abea1c809dfe526fb0435348a6fef3d380"}, + {file = "SQLAlchemy-2.0.29-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:38b624e5cf02a69b113c8047cf7f66b5dfe4a2ca07ff8b8716da4f1b3ae81567"}, + {file = "SQLAlchemy-2.0.29-cp38-cp38-win32.whl", hash = "sha256:bab41acf151cd68bc2b466deae5deeb9e8ae9c50ad113444151ad965d5bf685b"}, + {file = "SQLAlchemy-2.0.29-cp38-cp38-win_amd64.whl", hash = "sha256:52c8011088305476691b8750c60e03b87910a123cfd9ad48576d6414b6ec2a1d"}, + {file = "SQLAlchemy-2.0.29-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3071ad498896907a5ef756206b9dc750f8e57352113c19272bdfdc429c7bd7de"}, + {file = "SQLAlchemy-2.0.29-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dba622396a3170974f81bad49aacebd243455ec3cc70615aeaef9e9613b5bca5"}, + {file = "SQLAlchemy-2.0.29-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b184e3de58009cc0bf32e20f137f1ec75a32470f5fede06c58f6c355ed42a72"}, + {file = "SQLAlchemy-2.0.29-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c37f1050feb91f3d6c32f864d8e114ff5545a4a7afe56778d76a9aec62638ba"}, + {file = "SQLAlchemy-2.0.29-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bda7ce59b06d0f09afe22c56714c65c957b1068dee3d5e74d743edec7daba552"}, + {file = "SQLAlchemy-2.0.29-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:25664e18bef6dc45015b08f99c63952a53a0a61f61f2e48a9e70cec27e55f699"}, + {file = "SQLAlchemy-2.0.29-cp39-cp39-win32.whl", hash = "sha256:77d29cb6c34b14af8a484e831ab530c0f7188f8efed1c6a833a2c674bf3c26ec"}, + {file = "SQLAlchemy-2.0.29-cp39-cp39-win_amd64.whl", hash = "sha256:04c487305ab035a9548f573763915189fc0fe0824d9ba28433196f8436f1449c"}, + {file = "SQLAlchemy-2.0.29-py3-none-any.whl", hash = "sha256:dc4ee2d4ee43251905f88637d5281a8d52e916a021384ec10758826f5cbae305"}, + {file = "SQLAlchemy-2.0.29.tar.gz", hash = "sha256:bd9566b8e58cabd700bc367b60e90d9349cd16f0984973f98a9a09f9c64e86f0"}, ] [package.dependencies] @@ -2335,28 +2347,28 @@ telegram = ["requests"] [[package]] name = "traitlets" -version = "5.14.1" +version = "5.14.2" description = "Traitlets Python configuration system" optional = false python-versions = ">=3.8" files = [ - {file = "traitlets-5.14.1-py3-none-any.whl", hash = "sha256:2e5a030e6eff91737c643231bfcf04a65b0132078dad75e4936700b213652e74"}, - {file = "traitlets-5.14.1.tar.gz", hash = "sha256:8585105b371a04b8316a43d5ce29c098575c2e477850b62b848b964f1444527e"}, + {file = "traitlets-5.14.2-py3-none-any.whl", hash = "sha256:fcdf85684a772ddeba87db2f398ce00b40ff550d1528c03c14dbf6a02003cd80"}, + {file = "traitlets-5.14.2.tar.gz", hash = "sha256:8cdd83c040dab7d1dee822678e5f5d100b514f7b72b01615b26fc5718916fdf9"}, ] [package.extras] docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"] -test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0,<7.5)", "pytest-mock", "pytest-mypy-testing"] +test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0,<8.1)", "pytest-mock", "pytest-mypy-testing"] [[package]] name = "typing-extensions" -version = "4.9.0" +version = "4.11.0" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, - {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, + {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, + {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, ] [[package]] @@ -2597,20 +2609,20 @@ multidict = ">=4.0" [[package]] name = "zipp" -version = "3.17.0" +version = "3.18.1" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.8" files = [ - {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"}, - {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"}, + {file = "zipp-3.18.1-py3-none-any.whl", hash = "sha256:206f5a15f2af3dbaee80769fb7dc6f249695e940acca08dfb2a4769fe61e538b"}, + {file = "zipp-3.18.1.tar.gz", hash = "sha256:2884ed22e7d8961de1c9a05142eb69a247f120291bc0206a00a7642f09b5b715"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<4.0" -content-hash = "f31d084fb327ab8b1e6211692d11cab2f007ff1092277278ce7a7ac693961ee4" +content-hash = "bf1e44ba7742670be7413a4997399fe4c532ae160f7f6334bc1937b931e97f29" diff --git a/pyproject.toml b/pyproject.toml index bc9cc4c..8d96b47 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,7 @@ +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + [tool.poetry] name = "llama-parse" version = "0.4.0" @@ -9,12 +13,8 @@ packages = [{include = "llama_parse"}] [tool.poetry.dependencies] python = ">=3.8.1,<4.0" -llama-index-core = ">=0.10.7" +llama-index-core = ">=0.10.29" [tool.poetry.group.dev.dependencies] pytest = "^8.0.0" ipykernel = "^6.29.0" - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/tests/test_reader.py b/tests/test_reader.py index 1fe814b..e1dfab4 100644 --- a/tests/test_reader.py +++ b/tests/test_reader.py @@ -1,18 +1,46 @@ import os from llama_parse import LlamaParse -def test_simple_page_text(): + +def test_simple_page_text() -> None: parser = LlamaParse(result_type="text") - filepath = os.path.join(os.path.dirname(__file__), "test_files/attention_is_all_you_need.pdf") + filepath = os.path.join( + os.path.dirname(__file__), "test_files/attention_is_all_you_need.pdf" + ) result = parser.load_data(filepath) assert len(result) == 1 assert len(result[0].text) > 0 -def test_simple_page_markdown(): + +def test_simple_page_markdown() -> None: parser = LlamaParse(result_type="markdown") - filepath = os.path.join(os.path.dirname(__file__), "test_files/attention_is_all_you_need.pdf") + filepath = os.path.join( + os.path.dirname(__file__), "test_files/attention_is_all_you_need.pdf" + ) result = parser.load_data(filepath) assert len(result) == 1 assert len(result[0].text) > 0 + + +def test_simple_page_progress_workers() -> None: + parser = LlamaParse(result_type="markdown", show_progress=True, verbose=True) + + filepath = os.path.join( + os.path.dirname(__file__), "test_files/attention_is_all_you_need.pdf" + ) + result = parser.load_data([filepath, filepath]) + assert len(result) == 2 + assert len(result[0].text) > 0 + + parser = LlamaParse( + result_type="markdown", show_progress=True, num_workers=2, verbose=True + ) + + filepath = os.path.join( + os.path.dirname(__file__), "test_files/attention_is_all_you_need.pdf" + ) + result = parser.load_data([filepath, filepath]) + assert len(result) == 2 + assert len(result[0].text) > 0