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.2.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.2.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_node_parser_dashscope-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c42dcd3cf41a4f4978db09b171bd8d5dd08ee8ee5ec3432db2d6d7c5fc337fd7
MD5 9094ba335132f9425051bafc3f41d0a4
BLAKE2b-256 487592d7821222e5294f823364f55a7340eab62a37bf70fa2b360e99a752711b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_node_parser_dashscope-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d7b46689eea3aac00fcb4f739aa56075777ddad3e5ec81ebee8e928d8ba639b
MD5 e36f1a8a5256350d2c07ea536b2ccdcb
BLAKE2b-256 9291b2dd14f8012af99578c78a302d021fc80a3913214fdc657e060eaf003891

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