Skip to main content

LlamaIndex Indices Integration: Managed-Dashscope

Installation

pip install llama-index-indices-managed-dashscope

Usage

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)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_indices_managed_dashscope-0.5.1.tar.gz.

File metadata

  • Download URL: llama_index_indices_managed_dashscope-0.5.1.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_indices_managed_dashscope-0.5.1.tar.gz
Algorithm Hash digest
SHA256 a10749580d07813c1b8929390dcee9a314a82b2bf9180b85fe85d2e61ba10410
MD5 c950173ed1480a7aed7ab8900db3c9a4
BLAKE2b-256 473a6d1cf51a9c7445da218c39cb561edbf508a25177287919d782055b5bcced

See more details on using hashes here.

File details

Details for the file llama_index_indices_managed_dashscope-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: llama_index_indices_managed_dashscope-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_indices_managed_dashscope-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d80c681e0d38a0916667fb99cf5fd8cad319c20b6b7d45ddeab8d7c715eebe87
MD5 ad7e56db932a7a4fc5eee813be76a645
BLAKE2b-256 fd74bb1c3150f74409d96c0f5c12d82f0cf3bdaae572738706282ce64dbee160

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page