llama-index-indices-managed-dashscope-custom


Namellama-index-indices-managed-dashscope-custom JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
Summaryllama-index indices managed-dashscope integration
upload_time2024-05-21 10:30:48
maintainerNone
docs_urlNone
authorRuixue Ding
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 Indices Integration: Managed-Dashscope

## Installation

```shell
pip install llama-index-indices-managed-dashscope
```

## Usage

```python
import os
from llama_index.core.schema import QueryBundle
from llama_index.readers.dashscope.base import DashScopeParse
from llama_index.readers.dashscope.utils import ResultType

os.environ["DASHSCOPE_API_KEY"] = "your_api_key_here"
os.environ["DASHSCOPE_WORKSPACE_ID"] = "your_workspace_here"

# init retriever from scratch
from llama_index.indices.managed.dashscope.retriever import (
    DashScopeCloudRetriever,
)


file_list = [
    # your files (accept doc, docx, pdf)
]

parse = DashScopeParse(result_type=ResultType.DASHCOPE_DOCMIND)
documents = parse.load_data(file_path=file_list)

# create a new index
index = DashScopeCloudIndex.from_documents(
    documents,
    "my_first_index",
    verbose=True,
)

# # connect to an existing index
# index = DashScopeCloudIndex("my_first_index")

retriever = index.as_retriever()
nodes = retriever.retrieve("test query")
print(nodes)
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llama-index-indices-managed-dashscope-custom",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": null,
    "author": "Ruixue Ding",
    "author_email": "ada.drx@alibaba-inc.com",
    "download_url": "https://files.pythonhosted.org/packages/b2/15/01505b88239d219f9c8532e51fc1f3fc87acc3b4c209f22db8cbf1c817be/llama_index_indices_managed_dashscope_custom-0.1.1.tar.gz",
    "platform": null,
    "description": "# LlamaIndex Indices Integration: Managed-Dashscope\n\n## Installation\n\n```shell\npip install llama-index-indices-managed-dashscope\n```\n\n## Usage\n\n```python\nimport os\nfrom llama_index.core.schema import QueryBundle\nfrom llama_index.readers.dashscope.base import DashScopeParse\nfrom llama_index.readers.dashscope.utils import ResultType\n\nos.environ[\"DASHSCOPE_API_KEY\"] = \"your_api_key_here\"\nos.environ[\"DASHSCOPE_WORKSPACE_ID\"] = \"your_workspace_here\"\n\n# init retriever from scratch\nfrom llama_index.indices.managed.dashscope.retriever import (\n    DashScopeCloudRetriever,\n)\n\n\nfile_list = [\n    # your files (accept doc, docx, pdf)\n]\n\nparse = DashScopeParse(result_type=ResultType.DASHCOPE_DOCMIND)\ndocuments = parse.load_data(file_path=file_list)\n\n# create a new index\nindex = DashScopeCloudIndex.from_documents(\n    documents,\n    \"my_first_index\",\n    verbose=True,\n)\n\n# # connect to an existing index\n# index = DashScopeCloudIndex(\"my_first_index\")\n\nretriever = index.as_retriever()\nnodes = retriever.retrieve(\"test query\")\nprint(nodes)\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index indices managed-dashscope integration",
    "version": "0.1.1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab00bea254d0ea462f0ec515719f0d484d7286af210d75b5ace21565180d20c7",
                "md5": "d59a1390cf8a38bc0fbaaa2594a3b28d",
                "sha256": "4e7fa656a7a4c24d407a8ef6dd941ca595f99be06dee917b111cbd8fa0d02de5"
            },
            "downloads": -1,
            "filename": "llama_index_indices_managed_dashscope_custom-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d59a1390cf8a38bc0fbaaa2594a3b28d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 10157,
            "upload_time": "2024-05-21T10:30:46",
            "upload_time_iso_8601": "2024-05-21T10:30:46.463606Z",
            "url": "https://files.pythonhosted.org/packages/ab/00/bea254d0ea462f0ec515719f0d484d7286af210d75b5ace21565180d20c7/llama_index_indices_managed_dashscope_custom-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b21501505b88239d219f9c8532e51fc1f3fc87acc3b4c209f22db8cbf1c817be",
                "md5": "17c40b0969ba79e81bc25e217b8c7eca",
                "sha256": "659e1144871226f7e13017200845e35b179a6c2179e5b99f87798646402f4333"
            },
            "downloads": -1,
            "filename": "llama_index_indices_managed_dashscope_custom-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "17c40b0969ba79e81bc25e217b8c7eca",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 7956,
            "upload_time": "2024-05-21T10:30:48",
            "upload_time_iso_8601": "2024-05-21T10:30:48.144445Z",
            "url": "https://files.pythonhosted.org/packages/b2/15/01505b88239d219f9c8532e51fc1f3fc87acc3b4c209f22db8cbf1c817be/llama_index_indices_managed_dashscope_custom-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-21 10:30:48",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-indices-managed-dashscope-custom"
}
        
Elapsed time: 0.33943s