Skip to main content

llama-index readers dashscope integration

Project description

LlamaIndex Readers Integration: 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 2.
  • max_timeout: Optional[int] -- The maximum timeout in seconds to wait for the parsing to finish. The default value is 20000.
  • 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

Built Distribution

File details

Details for the file llama_index_readers_dashscope_custom-0.1.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_dashscope_custom-0.1.0.tar.gz
Algorithm Hash digest
SHA256 268d2c47ff167a3089398fd3c3eeff6d185059e1e7008acd32ba71b3811b06f5
MD5 3ab1732e135b6603ccb07ece062c95b8
BLAKE2b-256 3c143fcf289165f21a70905db547d2f738cf7c7624cf21481dfa3e371d9d2281

See more details on using hashes here.

File details

Details for the file llama_index_readers_dashscope_custom-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_dashscope_custom-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66718457e1b1ecde5d8a9d536b1dca2664540180c37e4ded8a7fc4b2a447028b
MD5 d05e7240363841547d78e67a41c2db1b
BLAKE2b-256 d6e215ef37a51d025283d8fbfd0f95976d1d962db7c236a4e4dad91808177797

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