AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/core/skill/repository/mysql/MysqlSkillRepository.java:1210–1307

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

Builder for creating MysqlSkillRepository instances with custom configuration.

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

方法摘要Method Summary

方法Method说明Description
public Builder databaseName(String databaseName)
设置数据库名称。
Set the database 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 database and tables if they don't exist.
public Builder writeable(boolean writeable)
设置该配置项。
Set whether the repository supports write operations.
public MysqlSkillRepository build()
构建MysqlSkillRepository 实例。
Build the MysqlSkillRepository instance.

方法详情Method Detail

databaseName

public Builder databaseName(String databaseName)

设置数据库名称。

Set the database name for storing skills.

参数Parameters
名称Name类型Type说明Description
databaseNameString数据库名称(类型 `String`)。the database name (default: "agentscope")
返回Returns Builder
返回当前实例,以支持链式调用。this builder for method chaining
源码Source io/agentscope/core/skill/repository/mysql/MysqlSkillRepository.java:1238–1241

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/mysql/MysqlSkillRepository.java:1249–1252

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/mysql/MysqlSkillRepository.java:1261–1264

createIfNotExist

public Builder createIfNotExist(boolean createIfNotExist)

创建 createIfNotExist。

Set whether to create database 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/mysql/MysqlSkillRepository.java:1273–1276

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/mysql/MysqlSkillRepository.java:1285–1288

build

public MysqlSkillRepository build()

构建MysqlSkillRepository 实例。

Build the MysqlSkillRepository instance.

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