Skip to main content

LlamaIndex Readers Integration: Alibabacloud_Aisearch

Installation

pip install llama-index-readers-alibabacloud-aisearch

Usage

Supported file types: ppt/pptx, doc/docx, pdf, images and so on. For further details, please visit:

You can specify the endpoint and aisearch_api_key in the constructor, or set the environment variables AISEARCH_ENDPOINT and AISEARCH_API_KEY.

Read local files

from llama_index.readers.alibabacloud_aisearch import (
    AlibabaCloudAISearchDocumentReader,
    AlibabaCloudAISearchImageReader,
)
from llama_index.core import SimpleDirectoryReader

document_reader = AlibabaCloudAISearchDocumentReader()
image_reader = AlibabaCloudAISearchImageReader()

file_extractor = {}
for suffix in (".pdf", ".docx", ".doc", ".ppt", ".pptx"):
    file_extractor[suffix] = document_reader
for suffix in (".jpg", ".jpeg", ".png", ".bmp", ".tiff"):
    file_extractor[suffix] = image_reader

documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data(show_progress=True)
print(documents)

Read remote files

from llama_index.readers.alibabacloud_aisearch import (
    AlibabaCloudAISearchImageReader,
)

image_reader = AlibabaCloudAISearchImageReader(
    service_id="ops-image-analyze-ocr-001"
)
image_urls = [
    "https://img.alicdn.com/imgextra/i1/O1CN01WksnF41hlhBFsXDNB_!!6000000004318-0-tps-1000-1400.jpg",
]

# The file_type is automatically determined based on the file extension.
# If it cannot be identified, manual specification of the file_type is required.
documents = image_reader.load_data(file_path=image_urls, file_type="jpg")
print(documents)

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

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

File details

Details for the file llama_index_readers_alibabacloud_aisearch-0.5.0.tar.gz.

File metadata

  • Download URL: llama_index_readers_alibabacloud_aisearch-0.5.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_readers_alibabacloud_aisearch-0.5.0.tar.gz
Algorithm Hash digest
SHA256 c9d9ce3c1732c588a861ab789f780471da789069554177b63cf7a3da629f83bc
MD5 8d239babc424613db87be5a8e00746d0
BLAKE2b-256 20718f4061f96786a133e486f85261045e49d3b0a93e6aa2f143cae0354c8515

See more details on using hashes here.

File details

Details for the file llama_index_readers_alibabacloud_aisearch-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_readers_alibabacloud_aisearch-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_readers_alibabacloud_aisearch-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a3ce26bfc7cbb788f2b80b39a76e8e6c2eae6e22ef2bbae4de0c94560baf2db
MD5 5a92afdf32512dc7246d09647c913f48
BLAKE2b-256 166b9c84cfc94468b4a2b4e7cae8d3ec58fa31c085beb85801b46f56e29becd1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page