Skip to main content

llama-index node_parser relational dashscope integration

Project description

LlamaIndex Node_Parser-Relational Integration: Dashscope

Transform your documents into nodes with ease using the Dashscope integration for LlamaIndex. This tool allows for precise control over chunk size, overlap size, and more, tailored for the Dashscope reader output format.

Quick Start

Get up and running with just a few lines of code:

import json
import os
from llama_index.node_parser.relational.dashscope import (
    DashScopeJsonNodeParser,
)
from llama_index.core.ingestion import IngestionPipeline
from llama_index.core.schema import Document

# Set your Dashscope API key in the environment
os.environ["DASHSCOPE_API_KEY"] = "your_api_key_here"

documents = [
    # Prepare your documents obtained from the Dashscope reader
]

# Initialize the DashScope JsonNodeParser
node_parser = DashScopeJsonNodeParser(
    chunk_size=100, overlap_size=0, separator=" |,|,|。|?|!|\n|\?|\!"
)

# Set up the ingestion pipeline with the node parser
pipeline = IngestionPipeline(transformations=[node_parser])

# Process the documents and print the resulting nodes
nodes = pipeline.run(documents=documents, show_progress=True)
for node in nodes:
    print(node)

Configuration

  • API Key: You need a Dashscope API key to begin. Set it in your environment as shown in the Quick Start section.
  • Document Preparation: Your documents must be in the Dashscope reader output format.

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

File details

Details for the file llama_index_node_parser_relational_dashscope_custom-0.1.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_node_parser_relational_dashscope_custom-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3f53fc3c687842bce86cc02f35694b4ab4749f3f984808aa6ba6605012110688
MD5 a449f1143ba145899028e9bfb3007f75
BLAKE2b-256 0a3a6664cece7e94b1aa60a3463a4a7c7214fe3e3b1d6157afbf70d365a7e41e

See more details on using hashes here.

File details

Details for the file llama_index_node_parser_relational_dashscope_custom-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_node_parser_relational_dashscope_custom-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8dde3efc3b4bb567d635f67de65463aa2f59f275e80a3a3e400c21e3e214e695
MD5 66e4ecaaf9f98ebb1f8899f17f96afc7
BLAKE2b-256 b54bb2ed1e0e29474d17bc7c066d0d98cebf8e0a6bf2bf7a7241d958558676af

See more details on using hashes here.

Supported by

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