HayStackDocument
@JsonIgnoreProperties(ignoreUnknown = true) public class HayStackDocument
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:23–126Hay Stack 文档,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.rag.integration.haystack.model 包。核心成员包括 getId、setId、getContent、setContent、getBlob、setBlob。
A class in io.agentscope.core.rag.integration.haystack.model that talks to model services and returns generated or embedded output. Declared in io.agentscope.core.rag.integration.haystack.model.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getId() | 获取标识。 Returns the id. |
public void setId(String id) | 设置标识。 Sets the id. |
public String getContent() | 获取内容。 Returns the content. |
public void setContent(String content) | 设置内容。 Sets the content. |
public ByteStream getBlob() | 获取二进制对象。 Returns the blob. |
public void setBlob(ByteStream blob) | 设置二进制对象。 Sets the blob. |
public Map<String, Object> getMeta() | 获取元数据。 Returns the meta. |
public void setMeta(Map<String, Object> meta) | 设置元数据。 Sets the meta. |
public Double getScore() | 获取分数。 Returns the score. |
public void setScore(Double score) | 设置分数。 Sets the score. |
public List<Double> getEmbedding() | 获取向量化。 Returns the embedding. |
public void setEmbedding(List<Double> embedding) | 设置向量化。 Sets the embedding. |
public SparseEmbedding getSparseEmbedding() | 获取 `getSparseEmbedding`。 Returns the sparse embedding. |
public void setSparseEmbedding(SparseEmbedding sparseEmbedding) | 设置 `setSparseEmbedding`。 Sets the sparse embedding. |
public String toString() | 返回 `toString` 结果。 Returns the to string. |
方法详情Method Detail
getId
public String getId()
获取标识。
Returns the id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:49–51setId
public void setId(String id)
设置标识。
Sets the id.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
id | String | 标识(类型 `String`)。The id. |
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:53–55getContent
public String getContent()
获取内容。
Returns the content.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:57–59setContent
public void setContent(String content)
设置内容。
Sets the content.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
content | String | 内容(类型 `String`)。The content. |
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:61–63getBlob
public ByteStream getBlob()
获取二进制对象。
Returns the blob.
ByteStream返回ByteStream。Returns byte stream.
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:65–67setBlob
public void setBlob(ByteStream blob)
设置二进制对象。
Sets the blob.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
blob | ByteStream | 二进制对象(类型 `ByteStream`)。The blob. |
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:69–71getMeta
public Map<String, Object> getMeta()
获取元数据。
Returns the meta.
Map<String, Object>返回映射。Returns map.
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:73–75setMeta
public void setMeta(Map<String, Object> meta)
设置元数据。
Sets the meta.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
meta | Map<String, Object> | 元数据(类型 `Map`)。The meta. |
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:77–79getScore
public Double getScore()
获取分数。
Returns the score.
Double返回数值结果。Returns a numeric result.
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:81–83setScore
public void setScore(Double score)
设置分数。
Sets the score.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
score | Double | 分数(类型 `Double`)。The score. |
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:85–87getEmbedding
public List<Double> getEmbedding()
获取向量化。
Returns the embedding.
List<Double>返回列出。Returns list.
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:89–91setEmbedding
public void setEmbedding(List<Double> embedding)
设置向量化。
Sets the embedding.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
embedding | List<Double> | 向量(类型 `List`)。The embedding. |
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:93–95getSparseEmbedding
public SparseEmbedding getSparseEmbedding()
获取 getSparseEmbedding。
Returns the sparse embedding.
SparseEmbedding返回SparseEmbedding。Returns sparse embedding.
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:97–99setSparseEmbedding
public void setSparseEmbedding(SparseEmbedding sparseEmbedding)
设置 setSparseEmbedding。
Sets the sparse embedding.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sparseEmbedding | SparseEmbedding | sparse 向量化(类型 `SparseEmbedding`)。The sparse embedding. |
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:101–103toString
public String toString()
返回 toString 结果。
Returns the to string.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/rag/integration/haystack/model/HayStackDocument.java:105–125