Builder
public static class Builder
源码Source
io/agentscope/core/rag/integration/haystack/model/SparseEmbedding.java:44–75构建器,用于构建并配置目标实例。位于 io.agentscope.core.rag.integration.haystack.model 包。核心成员包括 indices、values、build。
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 Builder indices(List<Integer> indices) | 设置索引。 List of indices of non-zero elements in the embedding. |
public Builder values(List<Float> values) | 设置值。 List of values of non-zero elements in the embedding. |
public SparseEmbedding build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
indices
public Builder indices(List<Integer> indices)
设置索引。
List of indices of non-zero elements in the embedding.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
indices | List<Integer> | 索引的列出。list of indices |
Builder返回当前实例,以支持链式调用。this builder
源码Source
io/agentscope/core/rag/integration/haystack/model/SparseEmbedding.java:56–59values
public Builder values(List<Float> values)
设置值。
List of values of non-zero elements in the embedding.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
values | List<Float> | 值的列出。list of values |
Builder返回当前实例,以支持链式调用。this builder
源码Source
io/agentscope/core/rag/integration/haystack/model/SparseEmbedding.java:67–70build
public SparseEmbedding build()
构建并返回最终实例。
Creates and returns an instance.
SparseEmbedding返回SparseEmbedding。Returns sparse embedding.
源码Source
io/agentscope/core/rag/integration/haystack/model/SparseEmbedding.java:72–74