llama-index-indices-managed-dashscope


Namellama-index-indices-managed-dashscope JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
Summaryllama-index indices managed-dashscope integration
upload_time2024-11-18 00:57:13
maintainerNone
docs_urlNone
authorRuixue Ding
requires_python<4.0,>=3.9
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",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Ruixue Ding",
    "author_email": "ada.drx@alibaba-inc.com",
    "download_url": "https://files.pythonhosted.org/packages/64/18/73bec587d6b06c0fbbf762ac319f39c43810307b4e3cf3a7ae30a37f2d9c/llama_index_indices_managed_dashscope-0.3.0.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.3.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1b6dc08f730e548adb1e0f1a7040904d05b561e80a6dc7895d6fc4b81d602d85",
                "md5": "b01866f5e51a6f0b4f749096b3c9a363",
                "sha256": "c88c72030b2274db0f055a999b554a1dbdcf8bb770e28b66f8da04f0bc48154d"
            },
            "downloads": -1,
            "filename": "llama_index_indices_managed_dashscope-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b01866f5e51a6f0b4f749096b3c9a363",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 10105,
            "upload_time": "2024-11-18T00:57:12",
            "upload_time_iso_8601": "2024-11-18T00:57:12.735924Z",
            "url": "https://files.pythonhosted.org/packages/1b/6d/c08f730e548adb1e0f1a7040904d05b561e80a6dc7895d6fc4b81d602d85/llama_index_indices_managed_dashscope-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "641873bec587d6b06c0fbbf762ac319f39c43810307b4e3cf3a7ae30a37f2d9c",
                "md5": "66a3f0ddb6f58516091c6b69b740a1fd",
                "sha256": "6ff104e4342ca2b89bdfda46c7ce0b3157638f09442535e2760ff9baced9182a"
            },
            "downloads": -1,
            "filename": "llama_index_indices_managed_dashscope-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "66a3f0ddb6f58516091c6b69b740a1fd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 7906,
            "upload_time": "2024-11-18T00:57:13",
            "upload_time_iso_8601": "2024-11-18T00:57:13.569653Z",
            "url": "https://files.pythonhosted.org/packages/64/18/73bec587d6b06c0fbbf762ac319f39c43810307b4e3cf3a7ae30a37f2d9c/llama_index_indices_managed_dashscope-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-18 00:57:13",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-indices-managed-dashscope"
}
        
Elapsed time: 0.72962s