AS AgentScopeAPI 手册 / API Reference

Segment

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

Segment,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.rag.integration.dify.model 包。核心成员包括 getId、setId、getDocumentId、setDocumentId、getContent、setContent。

Segment information from a retrieved document chunk.

方法摘要Method Summary

方法Method说明Description
public String getId()
获取标识。
Returns the id.
public void setId(String id)
设置标识。
Sets the id.
public String getDocumentId()
获取文档标识。
Returns the document id.
public void setDocumentId(String documentId)
设置文档标识。
Sets the document id.
public String getContent()
获取内容。
Returns the content.
public void setContent(String content)
设置内容。
Sets the content.
public String getAnswer()
获取答案。
Returns the answer.
public void setAnswer(String answer)
设置答案。
Sets the answer.
public Integer getPosition()
获取 `getPosition`。
Returns the position.
public void setPosition(Integer position)
设置 `setPosition`。
Sets the position.
public Integer getWordCount()
获取 `getWordCount`。
Returns the word count.
public void setWordCount(Integer wordCount)
设置 `setWordCount`。
Sets the word count.
public Integer getTokens()
获取令牌数。
Returns the tokens.
public void setTokens(Integer tokens)
设置令牌数。
Sets the tokens.
public List<String> getKeywords()
获取 `getKeywords`。
Returns the keywords.
public void setKeywords(List<String> keywords)
设置 `setKeywords`。
Sets the keywords.
public String getIndexNodeId()
获取索引节点标识。
Returns the index node id.
public void setIndexNodeId(String indexNodeId)
设置索引节点标识。
Sets the index node id.
public String getIndexNodeHash()
获取 `getIndexNodeHash`。
Returns the index node hash.
public void setIndexNodeHash(String indexNodeHash)
设置 `setIndexNodeHash`。
Sets the index node hash.
public Integer getHitCount()
获取 `getHitCount`。
Returns the hit count.
public void setHitCount(Integer hitCount)
设置 `setHitCount`。
Sets the hit count.
public Boolean getEnabled()
获取已启用。
Returns the enabled.
public void setEnabled(Boolean enabled)
设置已启用。
Sets the enabled.
public Long getDisabledAt()
获取已禁用 At。
Returns the disabled at.
public void setDisabledAt(Long disabledAt)
设置已禁用 At。
Sets the disabled at.
public String getDisabledBy()
获取已禁用通过。
Returns the disabled by.
public void setDisabledBy(String disabledBy)
设置已禁用通过。
Sets the disabled by.
public String getStatus()
获取状态。
Returns the status.
public void setStatus(String status)
设置状态。
Sets the status.
public String getCreatedBy()
获取已创建通过。
Returns the created by.
public void setCreatedBy(String createdBy)
设置已创建通过。
Sets the created by.
public Long getCreatedAt()
获取已创建 At。
Returns the created at.
public void setCreatedAt(Long createdAt)
设置已创建 At。
Sets the created at.
public Long getIndexingAt()
获取 `getIndexingAt`。
Returns the indexing at.
public void setIndexingAt(Long indexingAt)
设置 `setIndexingAt`。
Sets the indexing at.
public Long getCompletedAt()
获取已完成 At。
Returns the completed at.
public void setCompletedAt(Long completedAt)
设置已完成 At。
Sets the completed at.
public String getError()
获取错误。
Returns the error.
public void setError(String error)
设置错误。
Sets the error.
public Long getStoppedAt()
获取已停止 At。
Returns the stopped at.
public void setStoppedAt(Long stoppedAt)
设置已停止 At。
Sets the stopped at.
public DocumentInfo getDocument()
获取文档。
Returns the document.
public void setDocument(DocumentInfo document)
设置文档。
Sets the document.

方法详情Method Detail

getId

public String getId()

获取标识。

Returns the id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:166–168

setId

public void setId(String id)

设置标识。

Sets the id.

参数Parameters
名称Name类型Type说明Description
idString标识(类型 `String`)。The id.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:170–172

getDocumentId

public String getDocumentId()

获取文档标识。

Returns the document id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:174–176

setDocumentId

public void setDocumentId(String documentId)

设置文档标识。

Sets the document id.

参数Parameters
名称Name类型Type说明Description
documentIdString文档标识(类型 `String`)。The document id.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:178–180

getContent

public String getContent()

获取内容。

Returns the content.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:182–184

setContent

public void setContent(String content)

设置内容。

Sets the content.

参数Parameters
名称Name类型Type说明Description
contentString内容(类型 `String`)。The content.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:186–188

getAnswer

public String getAnswer()

获取答案。

Returns the answer.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:190–192

setAnswer

public void setAnswer(String answer)

设置答案。

Sets the answer.

参数Parameters
名称Name类型Type说明Description
answerString答案(类型 `String`)。The answer.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:194–196

getPosition

public Integer getPosition()

获取 getPosition。

Returns the position.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:198–200

setPosition

public void setPosition(Integer position)

设置 setPosition。

Sets the position.

参数Parameters
名称Name类型Type说明Description
positionIntegerposition(类型 `Integer`)。The position.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:202–204

getWordCount

public Integer getWordCount()

获取 getWordCount。

Returns the word count.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:206–208

setWordCount

public void setWordCount(Integer wordCount)

设置 setWordCount。

Sets the word count.

参数Parameters
名称Name类型Type说明Description
wordCountIntegerword 数量(类型 `Integer`)。The word count.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:210–212

getTokens

public Integer getTokens()

获取令牌数。

Returns the tokens.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:214–216

setTokens

public void setTokens(Integer tokens)

设置令牌数。

Sets the tokens.

参数Parameters
名称Name类型Type说明Description
tokensInteger令牌数(类型 `Integer`)。The tokens.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:218–220

getKeywords

public List<String> getKeywords()

获取 getKeywords。

Returns the keywords.

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

setKeywords

public void setKeywords(List<String> keywords)

设置 setKeywords。

Sets the keywords.

参数Parameters
名称Name类型Type说明Description
keywordsList<String>keywords(类型 `List`)。The keywords.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:226–228

getIndexNodeId

public String getIndexNodeId()

获取索引节点标识。

Returns the index node id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:230–232

setIndexNodeId

public void setIndexNodeId(String indexNodeId)

设置索引节点标识。

Sets the index node id.

参数Parameters
名称Name类型Type说明Description
indexNodeIdString索引节点标识(类型 `String`)。The index node id.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:234–236

getIndexNodeHash

public String getIndexNodeHash()

获取 getIndexNodeHash。

Returns the index node hash.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:238–240

setIndexNodeHash

public void setIndexNodeHash(String indexNodeHash)

设置 setIndexNodeHash。

Sets the index node hash.

参数Parameters
名称Name类型Type说明Description
indexNodeHashString索引节点 Hash(类型 `String`)。The index node hash.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:242–244

getHitCount

public Integer getHitCount()

获取 getHitCount。

Returns the hit count.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:246–248

setHitCount

public void setHitCount(Integer hitCount)

设置 setHitCount。

Sets the hit count.

参数Parameters
名称Name类型Type说明Description
hitCountIntegerhit 数量(类型 `Integer`)。The hit count.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:250–252

getEnabled

public Boolean getEnabled()

获取已启用。

Returns the enabled.

返回Returns Boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:254–256

setEnabled

public void setEnabled(Boolean enabled)

设置已启用。

Sets the enabled.

参数Parameters
名称Name类型Type说明Description
enabledBoolean已启用(类型 `Boolean`)。The enabled.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:258–260

getDisabledAt

public Long getDisabledAt()

获取已禁用 At。

Returns the disabled at.

返回Returns Long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:262–264

setDisabledAt

public void setDisabledAt(Long disabledAt)

设置已禁用 At。

Sets the disabled at.

参数Parameters
名称Name类型Type说明Description
disabledAtLong已禁用 At(类型 `Long`)。The disabled at.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:266–268

getDisabledBy

public String getDisabledBy()

获取已禁用通过。

Returns the disabled by.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:270–272

setDisabledBy

public void setDisabledBy(String disabledBy)

设置已禁用通过。

Sets the disabled by.

参数Parameters
名称Name类型Type说明Description
disabledByString已禁用通过(类型 `String`)。The disabled by.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:274–276

getStatus

public String getStatus()

获取状态。

Returns the status.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:278–280

setStatus

public void setStatus(String status)

设置状态。

Sets the status.

参数Parameters
名称Name类型Type说明Description
statusString状态(类型 `String`)。The status.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:282–284

getCreatedBy

public String getCreatedBy()

获取已创建通过。

Returns the created by.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:286–288

setCreatedBy

public void setCreatedBy(String createdBy)

设置已创建通过。

Sets the created by.

参数Parameters
名称Name类型Type说明Description
createdByString已创建通过(类型 `String`)。The created by.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:290–292

getCreatedAt

public Long getCreatedAt()

获取已创建 At。

Returns the created at.

返回Returns Long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:294–296

setCreatedAt

public void setCreatedAt(Long createdAt)

设置已创建 At。

Sets the created at.

参数Parameters
名称Name类型Type说明Description
createdAtLong已创建 At(类型 `Long`)。The created at.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:298–300

getIndexingAt

public Long getIndexingAt()

获取 getIndexingAt。

Returns the indexing at.

返回Returns Long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:302–304

setIndexingAt

public void setIndexingAt(Long indexingAt)

设置 setIndexingAt。

Sets the indexing at.

参数Parameters
名称Name类型Type说明Description
indexingAtLongindexing At(类型 `Long`)。The indexing at.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:306–308

getCompletedAt

public Long getCompletedAt()

获取已完成 At。

Returns the completed at.

返回Returns Long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:310–312

setCompletedAt

public void setCompletedAt(Long completedAt)

设置已完成 At。

Sets the completed at.

参数Parameters
名称Name类型Type说明Description
completedAtLong已完成 At(类型 `Long`)。The completed at.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:314–316

getError

public String getError()

获取错误。

Returns the error.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:318–320

setError

public void setError(String error)

设置错误。

Sets the error.

参数Parameters
名称Name类型Type说明Description
errorString错误(类型 `String`)。The error.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:322–324

getStoppedAt

public Long getStoppedAt()

获取已停止 At。

Returns the stopped at.

返回Returns Long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:326–328

setStoppedAt

public void setStoppedAt(Long stoppedAt)

设置已停止 At。

Sets the stopped at.

参数Parameters
名称Name类型Type说明Description
stoppedAtLong已停止 At(类型 `Long`)。The stopped at.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:330–332

getDocument

public DocumentInfo getDocument()

获取文档。

Returns the document.

返回Returns DocumentInfo
返回DocumentInfo。Returns document info.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:334–336

setDocument

public void setDocument(DocumentInfo document)

设置文档。

Sets the document.

参数Parameters
名称Name类型Type说明Description
documentDocumentInfo文档(类型 `DocumentInfo`)。The document.
源码Source io/agentscope/core/rag/integration/dify/model/DifyResponse.java:338–340
基于官方固定版本源码静态生成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.