llama-index-packs-amazon-product-extraction


Namellama-index-packs-amazon-product-extraction JSON
Version 0.1.2 PyPI version JSON
download
home_page
Summaryllama-index packs amazon_product_extraction integration
upload_time2024-02-13 22:51:29
maintainerjerryjliu
docs_urlNone
authorYour Name
requires_python>=3.8.1,<3.12
licenseMIT
keywords amazon extraction product
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Amazon Product Extraction Pack

This LlamaPack provides an example of our Amazon product extraction pack.

It loads in a website URL, screenshots the page. Then we use OpenAI GPT-4V + prompt engineering to extract the screenshot into a structured JSON output.

Check out the [notebook here](https://github.com/run-llama/llama-hub/blob/main/llama_hub/llama_packs/amazon_product_extraction/product_extraction.ipynb).

## CLI Usage

You can download llamapacks directly using `llamaindex-cli`, which comes installed with the `llama-index` python package:

```bash
llamaindex-cli download-llamapack AmazonProductExtractionPack --download-dir ./amazon_product_extraction_pack
```

You can then inspect the files at `./amazon_product_extraction_pack` and use them as a template for your own project.

## Code Usage

You can download the pack to a the `./amazon_product_extraction_pack` directory:

```python
from llama_index.core.llama_pack import download_llama_pack

# download and install dependencies
AmazonProductExtractionPack = download_llama_pack(
    "AmazonProductExtractionPack", "./amazon_product_extraction_pack"
)
```

From here, you can use the pack, or inspect and modify the pack in `./amazon_product_extraction_pack`.

Then, you can set up the pack like so:

```python
# create the pack
# get documents from any data loader
amazon_product_extraction_pack = SentenceWindowRetrieverPack(
    amazon_product_page,
)
```

The `run()` function is a light wrapper around `program()`.

```python
response = amazon_product_extraction_pack.run()
display(response.dict())
```

You can also use modules individually.

```python
# get pydantic program
program = amazon_product_extraction_pack.openai_program

# get multi-modal LLM
mm_llm = amazon_product_extraction_pack.openai_mm_llm
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "llama-index-packs-amazon-product-extraction",
    "maintainer": "jerryjliu",
    "docs_url": null,
    "requires_python": ">=3.8.1,<3.12",
    "maintainer_email": "",
    "keywords": "amazon,extraction,product",
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/9f/16/3c5a49d3b010214e09a3740f07f186d86522bf26b0f65d29804779a6ef4a/llama_index_packs_amazon_product_extraction-0.1.2.tar.gz",
    "platform": null,
    "description": "# Amazon Product Extraction Pack\n\nThis LlamaPack provides an example of our Amazon product extraction pack.\n\nIt loads in a website URL, screenshots the page. Then we use OpenAI GPT-4V + prompt engineering to extract the screenshot into a structured JSON output.\n\nCheck out the [notebook here](https://github.com/run-llama/llama-hub/blob/main/llama_hub/llama_packs/amazon_product_extraction/product_extraction.ipynb).\n\n## CLI Usage\n\nYou can download llamapacks directly using `llamaindex-cli`, which comes installed with the `llama-index` python package:\n\n```bash\nllamaindex-cli download-llamapack AmazonProductExtractionPack --download-dir ./amazon_product_extraction_pack\n```\n\nYou can then inspect the files at `./amazon_product_extraction_pack` and use them as a template for your own project.\n\n## Code Usage\n\nYou can download the pack to a the `./amazon_product_extraction_pack` directory:\n\n```python\nfrom llama_index.core.llama_pack import download_llama_pack\n\n# download and install dependencies\nAmazonProductExtractionPack = download_llama_pack(\n    \"AmazonProductExtractionPack\", \"./amazon_product_extraction_pack\"\n)\n```\n\nFrom here, you can use the pack, or inspect and modify the pack in `./amazon_product_extraction_pack`.\n\nThen, you can set up the pack like so:\n\n```python\n# create the pack\n# get documents from any data loader\namazon_product_extraction_pack = SentenceWindowRetrieverPack(\n    amazon_product_page,\n)\n```\n\nThe `run()` function is a light wrapper around `program()`.\n\n```python\nresponse = amazon_product_extraction_pack.run()\ndisplay(response.dict())\n```\n\nYou can also use modules individually.\n\n```python\n# get pydantic program\nprogram = amazon_product_extraction_pack.openai_program\n\n# get multi-modal LLM\nmm_llm = amazon_product_extraction_pack.openai_mm_llm\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index packs amazon_product_extraction integration",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [
        "amazon",
        "extraction",
        "product"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "03d1c4886a216087f0f99934c7e16f64b6a1ace285c49c9aca04c71eced6353b",
                "md5": "a5acea46980241c45756e4e3439f9270",
                "sha256": "3748bd52453d5b73ce0bb281471e10fd5122a81c1a1120931ed91495d1e88f4a"
            },
            "downloads": -1,
            "filename": "llama_index_packs_amazon_product_extraction-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a5acea46980241c45756e4e3439f9270",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<3.12",
            "size": 4009,
            "upload_time": "2024-02-13T22:51:28",
            "upload_time_iso_8601": "2024-02-13T22:51:28.871495Z",
            "url": "https://files.pythonhosted.org/packages/03/d1/c4886a216087f0f99934c7e16f64b6a1ace285c49c9aca04c71eced6353b/llama_index_packs_amazon_product_extraction-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f163c5a49d3b010214e09a3740f07f186d86522bf26b0f65d29804779a6ef4a",
                "md5": "05c1f8976d47f1f289d451b62b3acc20",
                "sha256": "45de5ad258a2858d36bfe8ae75f46597b9fbea150471058f75dda93302414870"
            },
            "downloads": -1,
            "filename": "llama_index_packs_amazon_product_extraction-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "05c1f8976d47f1f289d451b62b3acc20",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<3.12",
            "size": 3348,
            "upload_time": "2024-02-13T22:51:29",
            "upload_time_iso_8601": "2024-02-13T22:51:29.909576Z",
            "url": "https://files.pythonhosted.org/packages/9f/16/3c5a49d3b010214e09a3740f07f186d86522bf26b0f65d29804779a6ef4a/llama_index_packs_amazon_product_extraction-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-13 22:51:29",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-packs-amazon-product-extraction"
}
        
Elapsed time: 0.19967s