Metadata-Version: 2.1
Name: llama-index-indices-managed-dashscope-custom
Version: 0.1.0
Summary: llama-index indices managed-dashscope integration
License: MIT
Author: Ruixue Ding
Author-email: ada.drx@alibaba-inc.com
Requires-Python: >=3.8.1,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: llama-index-core (>=0.10.0,<0.11.0)
Requires-Dist: llama-index-embeddings-dashscope (>=0.1.3)
Requires-Dist: llama-index-node-parser-relational-dashscope-custom (>=0.1.0)
Requires-Dist: llama-index-readers-dashscope-custom (>=0.1.0)
Description-Content-Type: text/markdown

# LlamaIndex Indices Integration: 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)
```

