AS AgentScopeAPI 手册 / API Reference

DifyResponse

@JsonIgnoreProperties(ignoreUnknown = true) public class DifyResponse
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:44–379

Dify 响应,与模型服务通信并返回生成或向量化结果。位于 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.

返回Returns Query
返回查询。Returns query.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:50–52

setQuery

public void setQuery(Query query)

设置查询。

Sets the query.

参数Parameters
名称Name类型Type说明Description
queryQuery查询文本(类型 `Query`)。The query.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:54–56

getRecords

public List<Record> getRecords()

获取 getRecords。

Returns the records.

返回Returns List<Record>
返回列出。Returns list.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:58–60

setRecords

public void setRecords(List<Record> records)

设置 setRecords。

Sets the records.

参数Parameters
名称Name类型Type说明Description
recordsList<Record>records(类型 `List`)。The records.
源码Source 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 Segment

Segment,与模型服务通信并返回生成或向量化结果。位于 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.

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.