Builder
public static class Builder
源码Source
io/agentscope/core/rag/store/InMemoryStore.java:261–286InMemoryStore的构建器。位于 io.agentscope.core.rag.store 包。核心成员包括 dimensions、build。
Builder for InMemoryStore.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder dimensions(int dimensions) | 设置向量维度。 Sets the vector dimensions. |
public InMemoryStore build() | 构建新的InMemoryStore 实例。 Builds a new InMemoryStore instance. |
方法详情Method Detail
dimensions
public Builder dimensions(int dimensions)
设置向量维度。
Sets the vector dimensions.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
dimensions | int | 向量维度(类型 `int`)。the dimension of vectors to be stored (must be positive) |
Builder返回当前实例,以支持链式调用。this builder for method chaining
源码Source
io/agentscope/core/rag/store/InMemoryStore.java:272–275build
public InMemoryStore build()
构建新的InMemoryStore 实例。
Builds a new InMemoryStore instance.
InMemoryStore一种新的InMemoryStore 实例。a new InMemoryStore instance
IllegalArgumentException可能抛出 `IllegalArgumentException`。if dimensions is not positive
源码Source
io/agentscope/core/rag/store/InMemoryStore.java:283–285