Tool

Load Feishu Docs into LlamaIndex

A LlamaIndex data loader that extracts text from Feishu Docs by document ID, requiring a custom Feishu app for authentication and API access.

Works with feishu

74
Spark score
out of 100
Updated 2 days ago
Version 0.14.23
Models

Add to Favorites

Why it matters

Integrate your Feishu documents into LlamaIndex for advanced AI processing. This asset extracts text from specified Feishu Docs, making them readily available for indexing and querying within your AI applications.

Outcomes

What it gets done

01

Extract text content from Feishu documents using their unique IDs.

02

Prepare Feishu document data for ingestion into LlamaIndex.

03

Enable AI-powered analysis and retrieval of information stored in Feishu.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/li-reader-readers-feishu-docs | bash

Overview

Feishu Doc Loader

Feishu Doc Loader is a LlamaIndex data reader that extracts and parses text from Feishu Docs using their document IDs. It authenticates via a custom Feishu app's credentials and converts document content into LlamaIndex document objects. The loader uses Feishu API endpoints by default and can be switched to Lark API endpoints using the `set_lark_domain` method. Use this loader when building LlamaIndex applications that need to ingest content from Feishu Docs, such as internal knowledge bases, documentation search systems, or RAG pipelines. It's appropriate when you have access to create a custom Feishu app and can extract document IDs from Feishu Doc URLs.

What it does

Feishu Doc Loader is a LlamaIndex integration that parses text content from Feishu Docs into structured documents for indexing and retrieval. It connects to Feishu's API using custom app credentials, accepts document IDs extracted from Feishu Doc URLs, and returns parsed text ready for LlamaIndex pipelines. The loader uses Feishu API endpoints by default and can be switched to Lark API endpoints using the set_lark_domain method.

When to use - and when NOT to

Use this loader when you need to ingest documentation stored in Feishu Docs into a LlamaIndex-powered search, RAG, or knowledge base system. It's ideal for teams already using Feishu for documentation who want to make that content searchable through AI applications. Use it when you have the ability to create a custom Feishu app and obtain API credentials.

Do not use this loader if you need real-time synchronization with live document edits, as it performs point-in-time extraction. Avoid it if you cannot register a custom Feishu app or obtain the necessary app_id and app_secret credentials required for API access.

Inputs and outputs

You provide three inputs: your Feishu custom app ID, your app secret, and an array of Feishu document IDs. Document IDs are extracted directly from Feishu Doc URLs - for example, the ID from https://test-csl481dfkgqf.feishu.cn/docx/HIH2dHv21ox9kVxjRuwc1W0jnkf is HIH2dHv21ox9kVxjRuwc1W0jnkf.

The loader returns an array of LlamaIndex document objects containing the parsed text content from each specified Feishu Doc, ready for indexing, embedding, or other LlamaIndex operations.

Integrations

This loader integrates with LlamaIndex as a data reader component, designed specifically to load data into LlamaIndex pipelines. It connects to Feishu's API endpoints by default and can be switched to Lark API endpoints using the set_lark_domain method for Lark workspace users.

Who it's for

This loader serves data engineers and AI developers building LlamaIndex applications who need to incorporate Feishu documentation into their knowledge bases. It's particularly valuable for organizations using Feishu for internal documentation and wanting to power chatbots, search systems, or RAG applications with that content.

Developers must have access to Feishu's developer platform to create a custom app and obtain API credentials before using this loader.

Installation and usage

pip install llama-index-readers-feishu-docs
app_id = "cli_slkdjalasdkjasd"
app_secret = "dskLLdkasdjlasdKK"
doc_ids = ["HIH2dHv21ox9kVxjRuwc1W0jnkf"]
from llama_index.readers.feishu_docs import FeishuDocsReader

loader = FeishuDocsReader(app_id, app_secret)
documents = loader.load_data(document_ids=doc_ids)
Source README

Feishu Doc Loader

pip install llama-index-readers-feishu-docs

This loader takes in IDs of Feishu Docs and parses their text into documents. You can extract a Feishu Doc's ID directly from its URL. For example, the ID of https://test-csl481dfkgqf.feishu.cn/docx/HIH2dHv21ox9kVxjRuwc1W0jnkf is HIH2dHv21ox9kVxjRuwc1W0jnkf. As a prerequisite, you will need to register with Feishu and build an custom app. See here for instructions.

Usage

To use this loader, you simply need to pass in an array of Feishu Doc IDs. The default API endpoints are for Feishu, in order to switch to Lark, we should use set_lark_domain.

app_id = "cli_slkdjalasdkjasd"
app_secret = "dskLLdkasdjlasdKK"
doc_ids = ["HIH2dHv21ox9kVxjRuwc1W0jnkf"]
from llama_index.readers.feishu_docs import FeishuDocsReader

loader = FeishuDocsReader(app_id, app_secret)
documents = loader.load_data(document_ids=doc_ids)

This loader is designed to be used as a way to load data into LlamaIndex.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.