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.5.1.tar.gz (5.1 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.5.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_node_parser_dashscope-0.5.1.tar.gz
Algorithm Hash digest
SHA256 037e43717c2e5a75d3bcc83a5906300a27f89b46e484768cad67d0d2c7e6398b
MD5 34f8eabb1547bd55dce2685256222e62
BLAKE2b-256 1ad7cf870534d4298b5d41b364c7b264123ba8c5e825fa5156882436cb0d8e4f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_node_parser_dashscope-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c7ac46119a5fe08389aa11d58d95f83932fab87fb446e84be899014077f0834c
MD5 c3a0688836940cd92781ae0485e5c0a4
BLAKE2b-256 f39da052d5f44b466c74930040427af9d43c0143df257268632965e1a52bd3c1

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