llama-index-readers-faiss


Namellama-index-readers-faiss JSON
Version 0.1.4 PyPI version JSON
download
home_pageNone
Summaryllama-index readers faiss integration
upload_time2024-05-02 17:11:22
maintainerjerryjliu
docs_urlNone
authorYour Name
requires_python<4.0,>=3.8.1
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # LlamaIndex Readers Integration: Faiss

## Overview

Faiss Reader retrieves documents through an existing in-memory Faiss index. These documents can then be used in a downstream LlamaIndex data structure. If you wish to use Faiss itself as an index to organize documents, insert documents, and perform queries on them, please use VectorStoreIndex with FaissVectorStore.

### Installation

You can install Faiss Reader via pip:

```bash
pip install llama-index-readers-faiss
```

## Usage

```python
from llama_index.readers.faiss import FaissReader

# Initialize FaissReader with an existing Faiss Index object
reader = FaissReader(index="<Faiss Index Object>")

# Load data from Faiss
documents = reader.load_data(
    query="<Query Vector>",  # 2D numpy array of query vectors
    id_to_text_map={"<ID>": "<Text>"},  # A map from IDs to text
    k=4,  # Number of nearest neighbors to retrieve
    separate_documents=True,  # Whether to return separate documents
)
```

This loader is designed to be used as a way to load data into
[LlamaIndex](https://github.com/run-llama/llama_index/tree/main/llama_index).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llama-index-readers-faiss",
    "maintainer": "jerryjliu",
    "docs_url": null,
    "requires_python": "<4.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/73/0b/60c92fc05a7a7b29fa989bba594d0bdf9c8e114d0aaffe8ec8e13c09b288/llama_index_readers_faiss-0.1.4.tar.gz",
    "platform": null,
    "description": "# LlamaIndex Readers Integration: Faiss\n\n## Overview\n\nFaiss Reader retrieves documents through an existing in-memory Faiss index. These documents can then be used in a downstream LlamaIndex data structure. If you wish to use Faiss itself as an index to organize documents, insert documents, and perform queries on them, please use VectorStoreIndex with FaissVectorStore.\n\n### Installation\n\nYou can install Faiss Reader via pip:\n\n```bash\npip install llama-index-readers-faiss\n```\n\n## Usage\n\n```python\nfrom llama_index.readers.faiss import FaissReader\n\n# Initialize FaissReader with an existing Faiss Index object\nreader = FaissReader(index=\"<Faiss Index Object>\")\n\n# Load data from Faiss\ndocuments = reader.load_data(\n    query=\"<Query Vector>\",  # 2D numpy array of query vectors\n    id_to_text_map={\"<ID>\": \"<Text>\"},  # A map from IDs to text\n    k=4,  # Number of nearest neighbors to retrieve\n    separate_documents=True,  # Whether to return separate documents\n)\n```\n\nThis loader is designed to be used as a way to load data into\n[LlamaIndex](https://github.com/run-llama/llama_index/tree/main/llama_index).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index readers faiss integration",
    "version": "0.1.4",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5501116efd3965d1af1b5bdccfd9d0fd9916fc84c58f5011d7f1a5bfa21b01fe",
                "md5": "53580c2daf29142d9444cb8410588800",
                "sha256": "31ec3f9fd1f6757ca14cafc4ae9194ab69b66156cd65a57c691326a6272e7baf"
            },
            "downloads": -1,
            "filename": "llama_index_readers_faiss-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "53580c2daf29142d9444cb8410588800",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 3098,
            "upload_time": "2024-05-02T17:11:20",
            "upload_time_iso_8601": "2024-05-02T17:11:20.400310Z",
            "url": "https://files.pythonhosted.org/packages/55/01/116efd3965d1af1b5bdccfd9d0fd9916fc84c58f5011d7f1a5bfa21b01fe/llama_index_readers_faiss-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "730b60c92fc05a7a7b29fa989bba594d0bdf9c8e114d0aaffe8ec8e13c09b288",
                "md5": "55f9557010295a1c796f06766532fb72",
                "sha256": "06d091754f5f0d63664e56a25fad914f854a3817c573b846cff5fd08fd883107"
            },
            "downloads": -1,
            "filename": "llama_index_readers_faiss-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "55f9557010295a1c796f06766532fb72",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 2655,
            "upload_time": "2024-05-02T17:11:22",
            "upload_time_iso_8601": "2024-05-02T17:11:22.015511Z",
            "url": "https://files.pythonhosted.org/packages/73/0b/60c92fc05a7a7b29fa989bba594d0bdf9c8e114d0aaffe8ec8e13c09b288/llama_index_readers_faiss-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-02 17:11:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-readers-faiss"
}
        
Elapsed time: 0.18990s