RAGFlowChunk
@JsonIgnoreProperties(ignoreUnknown = true) public class RAGFlowChunk
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:53–260RAG Flow 分块,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.rag.integration.ragflow.model 包。核心成员包括 getId、setId、getContent、setContent、getContentLtks、setContentLtks。
RAGFlow chunk (document segment) model.
This class represents a chunk (text segment) returned by RAGFlow's retrieval API.
Real API Response Format:
`{
"id": "d78435d142bd5cf6704da62c778795c5",
"content": "ragflow content",
"content_ltks": "ragflow content",
"document_id": "5c5999ec7be811ef9cab0242ac120005",
"document_keyword": "1.txt",
"highlight": "<em>ragflow</em> content",
"kb_id": "c7ee74067a2c11efb21c0242ac120006",
"similarity": 0.9669436601210759,
"vector_similarity": 0.8898122004035864,
"term_similarity": 1.0,
"positions": [[0, 100], [200, 300]],
"image_id": "",
"important_keywords": ["ragflow", "content"]
}
`
Note: @JsonIgnoreProperties(ignoreUnknown = true) ensures forward
compatibility with API changes.
方法摘要Method Summary
方法详情Method Detail
getId
public String getId()
获取标识。
Returns the id.
Stringio/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:113–115setId
public void setId(String id)
设置标识。
Sets the id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
id | String | 标识(类型 `String`)。The id. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:117–119getContent
public String getContent()
获取内容。
Returns the content.
Stringio/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:121–123setContent
public void setContent(String content)
设置内容。
Sets the content.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
content | String | 内容(类型 `String`)。The content. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:125–127getContentLtks
public String getContentLtks()
获取 getContentLtks。
Returns the content ltks.
Stringio/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:129–131setContentLtks
public void setContentLtks(String contentLtks)
设置 setContentLtks。
Sets the content ltks.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
contentLtks | String | 内容 Ltks(类型 `String`)。The content ltks. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:133–135getHighlight
public String getHighlight()
获取 getHighlight。
Returns the highlight.
Stringio/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:137–139setHighlight
public void setHighlight(String highlight)
设置 setHighlight。
Sets the highlight.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
highlight | String | highlight(类型 `String`)。The highlight. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:141–143getDocumentId
public String getDocumentId()
获取文档标识。
Returns the document id.
Stringio/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:145–147setDocumentId
public void setDocumentId(String documentId)
设置文档标识。
Sets the document id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
documentId | String | 文档标识(类型 `String`)。The document id. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:149–151getDocumentKeyword
public String getDocumentKeyword()
获取 getDocumentKeyword。
Returns the document keyword.
Stringio/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:153–155setDocumentKeyword
public void setDocumentKeyword(String documentKeyword)
设置 setDocumentKeyword。
Sets the document keyword.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
documentKeyword | String | 文档 Keyword(类型 `String`)。The document keyword. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:157–159getKbId
public String getKbId()
获取知识库标识。
Returns the kb id.
Stringio/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:161–163setKbId
public void setKbId(String kbId)
设置知识库标识。
Sets the kb id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
kbId | String | 知识库标识(类型 `String`)。The kb id. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:165–167getSimilarity
public Double getSimilarity()
获取 getSimilarity。
Returns the similarity.
Doubleio/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:169–171setSimilarity
public void setSimilarity(Double similarity)
设置 setSimilarity。
Sets the similarity.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
similarity | Double | similarity(类型 `Double`)。The similarity. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:173–175getVectorSimilarity
public Double getVectorSimilarity()
获取 getVectorSimilarity。
Returns the vector similarity.
Doubleio/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:177–179setVectorSimilarity
public void setVectorSimilarity(Double vectorSimilarity)
设置 setVectorSimilarity。
Sets the vector similarity.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
vectorSimilarity | Double | 向量 Similarity(类型 `Double`)。The vector similarity. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:181–183getTermSimilarity
public Double getTermSimilarity()
获取 getTermSimilarity。
Returns the term similarity.
Doubleio/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:185–187setTermSimilarity
public void setTermSimilarity(Double termSimilarity)
设置 setTermSimilarity。
Sets the term similarity.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
termSimilarity | Double | term Similarity(类型 `Double`)。The term similarity. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:189–191getPositions
public List<List<Integer>> getPositions()
获取 getPositions。
Returns the positions.
List<List<Integer>>io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:193–195setPositions
public void setPositions(List<List<Integer>> positions)
设置 setPositions。
Sets the positions.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
positions | List<List<Integer>> | positions(类型 `List >`)。The positions. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:197–199getImageId
public String getImageId()
获取图像标识。
Returns the image id.
Stringio/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:201–203setImageId
public void setImageId(String imageId)
设置图像标识。
Sets the image id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
imageId | String | 图像标识(类型 `String`)。The image id. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:205–207getImportantKeywords
public List<String> getImportantKeywords()
获取 getImportantKeywords。
Returns the important keywords.
List<String>io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:209–211setImportantKeywords
public void setImportantKeywords(List<String> importantKeywords)
设置 setImportantKeywords。
Sets the important keywords.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
importantKeywords | List<String> | important Keywords(类型 `List`)。The important keywords. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:213–215getMetadata
public Map<String, Object> getMetadata()
获取元数据。
Returns the metadata.
Map<String, Object>io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:217–219setMetadata
public void setMetadata(Map<String, Object> metadata)
设置元数据。
Sets the metadata.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
metadata | Map<String, Object> | 元数据(类型 `Map`)。The metadata. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:221–223getDatasetId
public String getDatasetId()
获取 getDatasetId。
Returns the dataset id.
Stringio/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:226–229setDatasetId
public void setDatasetId(String datasetId)
设置 setDatasetId。
Sets the dataset id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
datasetId | String | dataset 标识(类型 `String`)。The dataset id. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:231–233getDocumentName
public String getDocumentName()
获取文档名称。
Returns the document name.
Stringio/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:235–238setDocumentName
public void setDocumentName(String documentName)
设置文档名称。
Sets the document name.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
documentName | String | 文档名称(类型 `String`)。The document name. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:240–242getScore
public Double getScore()
获取分数。
Gets the similarity score.
Doubleio/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:252–255setScore
public void setScore(Double score)
设置分数。
Sets the score.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
score | Double | 分数(类型 `Double`)。The score. |
io/agentscope/core/rag/integration/ragflow/model/RAGFlowChunk.java:257–259