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

llama_index_node_parser_dashscope-0.4.0.tar.gz (3.8 kB view details)

Uploaded Source

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_node_parser_dashscope-0.4.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_node_parser_dashscope-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ea06a8a2e0e1a8355603207ad2a6287b973865ac57c7ce5bf1ed00603bd0017a
MD5 032c4fe4c5f3dfd429212e7b315f5ce3
BLAKE2b-256 29d9c70b3a7be6b562e459934c46f3004fe3b696f12b6cbd52c350c66844b2e9

See more details on using hashes here.

File details

Details for the file llama_index_node_parser_dashscope-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_node_parser_dashscope-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb3006cd6017d78dcf8aca071516405e96204bb82c609ce66d35d3d02c68706d
MD5 1cedbb21074f236abdeacb3d4e2eae5b
BLAKE2b-256 f8ec87d42845cb1eec4454098dda7967f04257755e346d3f84f84e4d01963850

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