mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-31 04:45:23 +08:00
* docs: update wiki for RAG engine plugin architecture Replace KnowledgeRetriever component docs with RAGEngine across all three languages (zh/en/ja). Key changes: - Add new rag-engine.mdx component docs covering RAGEngine base class, creation_schema/retrieval_schema, capability declarations, lifecycle hooks, host RAG APIs, and complete code examples - Update knowledge base usage docs to reflect unified KB model (remove internal/external distinction, add RAG engine selection flow) - Update component list (add.mdx) and plugin intro to reference RAGEngine - Add RAG API section to plugin common APIs (invoke_embedding, vector_upsert/search/delete, get_rag_file_stream) - Update docs.json navigation to point to rag-engine pages Companion to LangBot PR #1995 and SDK PR #34. Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: sync with sdk * docs: update vector API docs with metadata filters, search_type, and documents support - Replace Warning tags about unimplemented filters with Info tags documenting canonical filter format (Chroma-style where syntax) and supported operators - Document search_type/query_text params for full-text and hybrid search - Document documents param for vector_upsert - Update RetrievalContext.filters description from reserved to active - Add filter usage examples (en/zh/ja) Co-Authored-By: Claude Opus 4.6 <[email protected]> * docs: enhance RAG Engine documentation across multiple languages - Expanded the description of the RAG Engine component to include bridging capabilities with advanced knowledge base services like Dify, RAGFlow, and FastGPT. - Clarified the `DOC_INGESTION` capability description, specifying conditions under which the declaration can be omitted. - Updated documentation in English, Japanese, and Chinese to ensure consistency and clarity. * docs: add instructions for show_if conditional rendering * docs: add Parser component documentation (zh/en/ja) Add Parser as a new component type in plugin docs. Parser extracts structured text from binary files (PDF, Word, etc.) before RAG engine ingestion. Includes manifest format, parse method API, data models (ParseContext/ParseResult/TextSection), RAGEngine integration via parsed_content, and cross-plugin invoke_parser API. Also add DOC_PARSING capability to RAG engine docs and parsed_content field to IngestionContext. Companion to SDK PR langbot-app/langbot-plugin-sdk#37 and LangBot PR langbot-app/LangBot#2000. Co-Authored-By: Claude Opus 4.6 <[email protected]> * docs: rename RAGEngine components to KnowledgeEngine * refactor: change rag engine to knowledge engine --------- Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Junyan Qin <[email protected]>
77 lines
2.1 KiB
Plaintext
77 lines
2.1 KiB
Plaintext
---
|
|
title: "Adding Components"
|
|
---
|
|
|
|
Plugins consist of one or more components that provide different functionalities to LangBot. Currently supported component types include:
|
|
|
|
- Event Listeners (EventListener): Listen to events during pipeline execution and modify context or pipelines.
|
|
- Commands (Command): Triggered by user command messages starting with `!` (or other configured prefixes).
|
|
- Tools (Tool): Called by LLMs during execution of LangBot's built-in Local Agent.
|
|
- Knowledge Engines (KnowledgeEngine): Provide knowledge base indexing and retrieval capabilities for LangBot, managing document ingestion, retrieval, and deletion.
|
|
- Parsers (Parser): Parse binary files such as PDF, Word, etc. into structured text before document ingestion, for use by Knowledge Engines.
|
|
|
|
## Adding Components
|
|
|
|
Execute the command in the plugin directory:
|
|
|
|
```bash
|
|
lbp comp <component_type>
|
|
```
|
|
|
|
For example, to add an event listener:
|
|
|
|
```bash
|
|
lbp comp EventListener
|
|
```
|
|
|
|
Follow the prompts to enter the component configuration (if any).
|
|
|
|
```bash
|
|
➜ HelloPlugin > lbp comp EventListener
|
|
Generating component EventListener...
|
|
Component EventListener generated successfully.
|
|
组件 EventListener 生成成功。
|
|
➜ HelloPlugin >
|
|
```
|
|
|
|
<Info title="The CLI will generate a `components` directory in the plugin directory and create corresponding component directories within it.">
|
|
|
|
```
|
|
.
|
|
├── assets
|
|
│ └── icon.svg
|
|
├── components
|
|
│ ├── __init__.py
|
|
│ └── event_listener
|
|
│ ├── __init__.py
|
|
│ ├── default.py
|
|
│ └── default.yaml
|
|
├── main.py
|
|
├── manifest.yaml
|
|
├── README.md
|
|
└── requirements.txt
|
|
```
|
|
|
|
At the same time, component discovery configuration will be added to the plugin's `manifest.yaml`:
|
|
|
|
```yaml
|
|
...
|
|
components:
|
|
EventListener:
|
|
fromDirs:
|
|
- path: components/event_listener/
|
|
...
|
|
```
|
|
To remove components, you can delete the corresponding information manually.
|
|
</Info>
|
|
|
|
## Component Types
|
|
|
|
For detailed usage of each component, please refer to:
|
|
|
|
- [EventListener](./event-listener)
|
|
- [Command](./command)
|
|
- [Tool](./tool)
|
|
- [KnowledgeEngine](./knowledge-engine)
|
|
- [Parser](./parser)
|