Builder
public static class Builder
源码Source
io/agentscope/core/rag/integration/dify/DifyKnowledge.java:255–314DifyKnowledge的构建器。位于 io.agentscope.core.rag.integration.dify 包。核心成员包括 config、client、build。
Builder for DifyKnowledge.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder config(DifyRAGConfig config) | 设置配置。 Sets the Dify configuration. |
public Builder client(DifyRAGClient client) | 设置客户端。 Sets the Dify client directly. |
public DifyKnowledge build() | 构建新的DifyKnowledge 实例。 Builds a new DifyKnowledge instance. |
方法详情Method Detail
config
public Builder config(DifyRAGConfig config)
设置配置。
Sets the Dify configuration.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
config | DifyRAGConfig | 配置对象(类型 `DifyRAGConfig`)。the Dify configuration |
Builder返回当前实例,以支持链式调用。this builder for method chaining
源码Source
io/agentscope/core/rag/integration/dify/DifyKnowledge.java:270–273client
public Builder client(DifyRAGClient client)
设置客户端。
Sets the Dify client directly.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
client | DifyRAGClient | 客户端(类型 `DifyRAGClient`)。the Dify client |
Builder返回当前实例,以支持链式调用。this builder for method chaining
源码Source
io/agentscope/core/rag/integration/dify/DifyKnowledge.java:284–287build
public DifyKnowledge build()
构建新的DifyKnowledge 实例。
Builds a new DifyKnowledge instance.
DifyKnowledge一种新的DifyKnowledge 实例。a new DifyKnowledge instance
IllegalArgumentException可能抛出 `IllegalArgumentException`。if required parameters are missingIllegalStateException可能抛出 `IllegalStateException`。if both config and client are set
源码Source
io/agentscope/core/rag/integration/dify/DifyKnowledge.java:296–313