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
Release history Release notifications | RSS feed
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
Close
Hashes for llama_index_readers_dashscope-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea1644475c55094d4487c93dd71c018bba1b654c5816c30815f0764d536ad630 |
|
MD5 | 6549a5783885e719903906c79ce32de7 |
|
BLAKE2b-256 | 1aac798656961e0b2eefc49746f8d175f2053dddd2c518d44a34656e793fb1a7 |
Close
Hashes for llama_index_readers_dashscope-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93e23e83821485951a9e6284baae09de746e76d4f5cb5da2ac23f7a53d69f16d |
|
MD5 | 6347ccf3d702a736c5a5fb9c794ef9a6 |
|
BLAKE2b-256 | a4dfaf175eca382887fee011a877d1260b6a514265e9770f1ae2639533dd4f8d |