用法
我们在此示例中使用本地 PgVector 数据库。请确保它正在运行
knowledge_base
与 Agent
一起使用:
参数
参数 | 类型 | 默认 | 描述 |
---|---|---|---|
documents | List[Document] | - | 要用作知识库的 Document 对象列表 |
DocumentKnowledgeBase
是 AgentKnowledge 类的子类,可以访问相同的参数。
开发者资源
- 查看 同步加载 Cookbook
- 查看 异步加载 Cookbook
了解如何在知识库中使用本地文档。
knowledge_base
与 Agent
一起使用:
参数 | 类型 | 默认 | 描述 |
---|---|---|---|
documents | List[Document] | - | 要用作知识库的 Document 对象列表 |
DocumentKnowledgeBase
是 AgentKnowledge 类的子类,可以访问相同的参数。