Skip to main content

llama-index node_parser 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.

Installation

pip install llama-index-node-parser-dashscope

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_dashscope_custom-0.1.2.tar.gz.

File metadata

File hashes

Hashes for llama_index_node_parser_dashscope_custom-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6d4e11ba638303336cc59f54823f7c7f2ebc0aef3db1acf1ed8fa55dbe66455d
MD5 e9e02590b230024d190f686d5752233d
BLAKE2b-256 3006ab1156e842884651a17e8094a2c7bb152e975e948111787ba4e0ac094e8f

See more details on using hashes here.

File details

Details for the file llama_index_node_parser_dashscope_custom-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_node_parser_dashscope_custom-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d853187894285cfb3a96283399aeb7df53048b58da45538f47c9cc3b1bb9ad80
MD5 726b89cc63ceb06121d61108b91ac8fa
BLAKE2b-256 d0a40eb52536e83ba9f6b005724a977ff590354db120f5378856aa24a87e61ad

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