feat(plugins): consolidate official plugins with independent releases (LANG-180) (#2797)

Co-authored-by: multica-agent <[email protected]>
This commit is contained in:
RockChinQ
2026-10-28 17:32:24 +08:00
committed by GitHub
co-authored by multica-agent
parent d099033d79
commit 3a77306c3c
1144 changed files with 142049 additions and 130 deletions
@@ -114,7 +114,7 @@ class SimpleRag(KnowledgeEngine):
## 插件处理
默认会生成如下代码(`components/knowledge_engine/<引擎名称>.py`),您需要实现 `ingest`、`retrieve`、`delete_document` 三个核心方法。完整代码可在 [langbot-plugin-demo](https://github.com/langbot-app/langbot-plugin-demo) 的 `SimpleKnowledgeEngine` 中找到。
默认会生成如下代码(`components/knowledge_engine/<引擎名称>.py`),您需要实现 `ingest`、`retrieve`、`delete_document` 三个核心方法。完整实现可参考官方 [LangRAG 知识引擎](https://github.com/langbot-app/LangBot/tree/master/plugins/KnowledgeEngine/LangRAG)。
```python
from langbot_plugin.api.definition.components.knowledge_engine.engine import KnowledgeEngine, KnowledgeEngineCapability
@@ -119,7 +119,7 @@ execution:
## 插件处理
默认会生成如下代码(`components/knowledge_retriever/<检索器名称>.py`),您需要在`FastGPT`类的`retrieve`方法中实现知识检索逻辑。完整代码可在[langbot-plugin-demo](https://github.com/langbot-app/langbot-plugin-demo)中找到。
默认会生成如下代码(`components/knowledge_retriever/<检索器名称>.py`),您需要在`FastGPT`类的`retrieve`方法中实现知识检索逻辑。完整代码可在[official plugins](https://github.com/langbot-app/LangBot/tree/master/plugins)中找到。
```python
# Auto generated by LangBot Plugin SDK.
+1 -1
View File
@@ -234,7 +234,7 @@ await langbot.api('/entries', { question: '...', answer: '...' }, 'POST');
await langbot.api('/entries', { id: '...' }, 'DELETE');
```
完整示例代码请参考 [FAQManager 插件](https://github.com/langbot-app/langbot-plugin-demo/tree/main/FAQManager)。
完整示例代码请参考 [FAQManager 插件](https://github.com/langbot-app/LangBot/tree/master/plugins/misc/FAQManager)。
## 一个安装,多份用法
+1 -1
View File
@@ -207,5 +207,5 @@ async with ctx.reply_stream() as reply:
- 查看 [`RunnerContext` 上下文 API](/zh/plugin/dev/apis/agent-run#runner)。
- 查看模型、工具、知识库和存储相关的 [LangBot API](/zh/plugin/dev/apis/common)。
- 查看消息发送等[平台 API](/zh/plugin/dev/apis/platform)。
- 查看 [RunnerDemo](https://github.com/langbot-app/langbot-plugin-demo/tree/main/Runner/RunnerDemo) 中的更多示例。
- 查看 [RunnerDemo](https://github.com/langbot-app/LangBot/tree/master/plugins/Runner/RunnerDemo) 中的更多示例。
- 如果要扩展流水线的预处理、模型调用完成等步骤,请使用[事件监听器](/zh/plugin/dev/components/event-listener)。