DifyResponse
@JsonIgnoreProperties(ignoreUnknown = true) public class DifyResponse
io/agentscope/core/rag/integration/dify/model/DifyResponse.java:44–379Dify 响应,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.rag.integration.dify.model 包。核心成员包括 getQuery、setQuery、getRecords、setRecords。
Response model for Dify knowledge base retrieval API.
This class maps the JSON response from Dify's retrieve endpoint:
`{
"query": { "content": "..." },
"records": [
{
"segment": {
"id": "...",
"document_id": "...",
"content": "...",
"position": 1,
"document": { "id": "...", "name": "..." }
},
"score": 0.95
}
]
}
`
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Query | 类class | 查询,与模型服务通信并返回生成或向量化结果。 Query information from the response. |
Record | 类class | 记录,与模型服务通信并返回生成或向量化结果。 A single retrieval record containing segment and score. |
Segment | 类class | Segment,与模型服务通信并返回生成或向量化结果。 Segment information from a retrieved document chunk. |
DocumentInfo | 类class | 文档信息,与模型服务通信并返回生成或向量化结果。 Document information nested within a segment. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Query getQuery() | 获取查询。 Returns the query. |
public void setQuery(Query query) | 设置查询。 Sets the query. |
public List<Record> getRecords() | 获取 `getRecords`。 Returns the records. |
public void setRecords(List<Record> records) | 设置 `setRecords`。 Sets the records. |
方法详情Method Detail
getQuery
public Query getQuery()
获取查询。
Returns the query.
Queryio/agentscope/core/rag/integration/dify/model/DifyResponse.java:50–52setQuery
public void setQuery(Query query)
设置查询。
Sets the query.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
query | Query | 查询文本(类型 `Query`)。The query. |
io/agentscope/core/rag/integration/dify/model/DifyResponse.java:54–56getRecords
public List<Record> getRecords()
获取 getRecords。
Returns the records.
List<Record>io/agentscope/core/rag/integration/dify/model/DifyResponse.java:58–60setRecords
public void setRecords(List<Record> records)
设置 setRecords。
Sets the records.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
records | List<Record> | records(类型 `List`)。The records. |
io/agentscope/core/rag/integration/dify/model/DifyResponse.java:62–64嵌套类详情Nested Class Detail
Query
@JsonIgnoreProperties(ignoreUnknown = true) public static class Query查询,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.rag.integration.dify.model 包。核心成员包括 getContent、setContent。
Query information from the response.
Record
@JsonIgnoreProperties(ignoreUnknown = true) public static class Record记录,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.rag.integration.dify.model 包。核心成员包括 getSegment、setSegment、getScore、setScore。
A single retrieval record containing segment and score.
Segment
@JsonIgnoreProperties(ignoreUnknown = true) public static class SegmentSegment,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.rag.integration.dify.model 包。核心成员包括 getId、setId、getDocumentId、setDocumentId、getContent、setContent。
Segment information from a retrieved document chunk.
DocumentInfo
@JsonIgnoreProperties(ignoreUnknown = true) public static class DocumentInfo文档信息,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.rag.integration.dify.model 包。核心成员包括 getId、setId、getDataSourceType、setDataSourceType、getName、setName。
Document information nested within a segment.