AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/core/skill/repository/postgresql/PostgresSkillRepository.java:1299–1396

构建器,用于构建并配置目标实例。位于 io.agentscope.core.skill.repository.postgresql 包。核心成员包括 schemaName、skillsTableName、resourcesTableName、createIfNotExist、writeable、build。

Builder for creating PostgresSkillRepository instances with custom configuration.

This builder provides a fluent API for configuring all aspects of the repository, including schema name, table names, and behavior options.

方法摘要Method Summary

方法Method说明Description
public Builder schemaName(String schemaName)
设置模式名称。
Set the schema name for storing skills.
public Builder skillsTableName(String skillsTableName)
设置该配置项。
Set the skills table name.
public Builder resourcesTableName(String resourcesTableName)
设置该配置项。
Set the resources table name.
public Builder createIfNotExist(boolean createIfNotExist)
创建 `createIfNotExist`。
Set whether to create schema and tables if they don't exist.
public Builder writeable(boolean writeable)
设置该配置项。
Set whether the repository supports write operations.
public PostgresSkillRepository build()
构建PostgresSkillRepository 实例。
Build the PostgresSkillRepository instance.

方法详情Method Detail

schemaName

public Builder schemaName(String schemaName)

设置模式名称。

Set the schema name for storing skills.

参数Parameters
名称Name类型Type说明Description
schemaNameString模式名称(类型 `String`)。the schema name (default: "agentscope")
返回Returns Builder
返回当前实例,以支持链式调用。this builder for method chaining
源码Source io/agentscope/core/skill/repository/postgresql/PostgresSkillRepository.java:1327–1330

skillsTableName

public Builder skillsTableName(String skillsTableName)

设置该配置项。

Set the skills table name.

参数Parameters
名称Name类型Type说明Description
skillsTableNameString技能 Table 名称(类型 `String`)。the skills table name (default: "agentscope_skills")
返回Returns Builder
返回当前实例,以支持链式调用。this builder for method chaining
源码Source io/agentscope/core/skill/repository/postgresql/PostgresSkillRepository.java:1338–1341

resourcesTableName

public Builder resourcesTableName(String resourcesTableName)

设置该配置项。

Set the resources table name.

参数Parameters
名称Name类型Type说明Description
resourcesTableNameStringresources Table 名称(类型 `String`)。the resources table name (default: "agentscope_skill_resources")
返回Returns Builder
返回当前实例,以支持链式调用。this builder for method chaining
源码Source io/agentscope/core/skill/repository/postgresql/PostgresSkillRepository.java:1350–1353

createIfNotExist

public Builder createIfNotExist(boolean createIfNotExist)

创建 createIfNotExist。

Set whether to create schema and tables if they don't exist.

参数Parameters
名称Name类型Type说明Description
createIfNotExistboolean创建 If 不 Exist(类型 `boolean`)。true to auto-create, false to require existing (default: true)
返回Returns Builder
返回当前实例,以支持链式调用。this builder for method chaining
源码Source io/agentscope/core/skill/repository/postgresql/PostgresSkillRepository.java:1362–1365

writeable

public Builder writeable(boolean writeable)

设置该配置项。

Set whether the repository supports write operations.

参数Parameters
名称Name类型Type说明Description
writeablebooleanwriteable(类型 `boolean`)。true to enable write operations, false for read-only (default: true)
返回Returns Builder
返回当前实例,以支持链式调用。this builder for method chaining
源码Source io/agentscope/core/skill/repository/postgresql/PostgresSkillRepository.java:1374–1377

build

public PostgresSkillRepository build()

构建PostgresSkillRepository 实例。

Build the PostgresSkillRepository instance.

返回Returns PostgresSkillRepository
一种新的PostgresSkillRepository 实例。a new PostgresSkillRepository instance
抛出Throws
  • IllegalArgumentException 可能抛出 `IllegalArgumentException`。if identifiers are invalid
  • IllegalStateException 可能抛出 `IllegalStateException`。if createIfNotExist is false and schema/tables do not exist
源码Source io/agentscope/core/skill/repository/postgresql/PostgresSkillRepository.java:1387–1395
基于官方固定版本源码静态生成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.