Skip to main content

llama-index readers dashscope integration

Project description

LlamaIndex Readers Integration: Dashscope

Installation

pip install llama-index-readers-dashscope

Usage

from llama_index.readers.dashscope.base import DashScopeParse
from llama_index.readers.dashscope.utils import ResultType

file_list = [
    # your files (accept doc, docx, pdf)
]

parse = DashScopeParse(result_type=ResultType.DASHCOPE_DOCMIND)
documents = parse.load_data(file_path=file_list)

Reader Setting:

A full list of retriever settings/kwargs is below:

  • api_key: Optional[str] -- Your dashscope API key, which can be passed in through environment variables or parameters. The parameter settings will override the results from the environment variables
  • workspace_id: Optional[str] -- Your dashscope workspace_id, which can be passed in through environment variables or parameters. The parameter settings will override the results from the environment variables
  • base_url: Optional[str] -- The base url for the Dashscope API. The default value is "https://dashscope.aliyuncs.com". The parameter settings will override the results from the environment variables.
  • result_type: Optional[ResultType] -- The result type for the parser. The default value is ResultType.DASHCOPE_DOCMIND.
  • num_workers: Optional[int] -- The number of workers to use sending API requests for parsing. The default value is 4, greater than 0, less than 10.
  • check_interval: Optional[int] -- The interval in seconds to check if the parsing is done. The default value is 5.
  • max_timeout: Optional[int] -- The maximum timeout in seconds to wait for the parsing to finish. The default value is 3600.
  • verbose: Optional[bool] -- Whether to print the progress of the parsing. The default value is True.
  • show_progress: Optional[bool] -- Show progress when parsing multiple files. The default value is True.
  • ignore_errors: Optional[bool] -- Whether or not to ignore and skip errors raised during parsing. The default value is True.

Reader Input:

  • file_path: Union[str, List[str]] -- The file path or list of file paths to parse.

Reader Output:

  • List[llama_index.core.schema.Document] -- The list of documents parsed from the file.
    • text: str -- The text of the document from DASHCOPE_DOCMIND.

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_readers_dashscope-0.4.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_readers_dashscope-0.4.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_readers_dashscope-0.4.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_dashscope-0.4.1.tar.gz
Algorithm Hash digest
SHA256 111656e0d512dd892d6baa78e84d5a700decdeeebcba2e87faf6a990af237b07
MD5 4415d98acaef23dce7b2cadc7e173c0e
BLAKE2b-256 93a120a7db11d5ab34280375afe32eb56822ca9cb79f2512d826f5c8d77e9d64

See more details on using hashes here.

File details

Details for the file llama_index_readers_dashscope-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_dashscope-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3ee958d5c06c08ec58cc7c50d3de73e461419f274a846e34520068532464e3b7
MD5 384f16e07d74d485081bb6ae3de67759
BLAKE2b-256 78bc513dad405b9b7ed7aa8be17fc28a26e1e4ecd1d94fd93613ec997fb344b6

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