Skip to main content

llama-index indices managed-dashscope integration

Project description

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)

Project details


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.0.tar.gz.

File metadata

  • Download URL: llama_index_indices_managed_dashscope-0.5.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.0.tar.gz
Algorithm Hash digest
SHA256 637fd9cd614b4112eb641b8391eca3ae3ee0dcb55c883f12f4044ca6f99cbe15
MD5 e19b423394870759b77dcd1263e6269c
BLAKE2b-256 d92fe365800163121fe9ec2a8d41694e3e7466265d2fd21c1d2529ec8eab412e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llama_index_indices_managed_dashscope-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94526bf5a536a1d7d98e8bbf5fbeead5b2669df1172527266e96cdf0030341b2
MD5 bb654efb618b43652c5ff07b91dc6e4b
BLAKE2b-256 34f715ae05030a1629d4dedf8e108f42e905a2acde1940e439ee3d7ff3605860

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