CoreAPI

interface CoreAPI(source)

AutoTweaker/core 为适配器提供的 API,主要包含适配器、会话、配置的管理。

基础设施类的 API 通过 able 接口暴露,参见 io.github.autotweaker.api.Loggableio.github.autotweaker.api.Traceableio.github.autotweaker.api.JsonStorableio.github.autotweaker.api.I18nable

Author

WhiteElephant-abc

See also

Types

Link copied to clipboard
interface AdapterAPI

查询和启停 AutoTweaker 加载的适配器,AutoTweaker 不支持动态加载或卸载适配器。

Link copied to clipboard
interface ConfigAPI

管理环境变量、模型提供商、模型。

Link copied to clipboard
interface I18nAPI

管理 i18n 服务和 i18n 自动翻译服务的 API。

Link copied to clipboard
interface LogAPI

获取应用程序的日志,不仅限于 AutoTweaker/core,只要使用了 org.slf4j 的 API。

Link copied to clipboard
interface PersistenceAPI

读取持久化数据的 API。

Link copied to clipboard
interface SecretAPI

AutoTweaker 使用 GPG 加密存储密钥,私钥与密文放在一起,需要通过用户设置密码来保护密文。

Link copied to clipboard
interface SessionAPI

管理会话,AutoTweaker AI 功能的主要 API。

Link copied to clipboard
interface ToolAPI

查询工具属性或处理工具参数。

Link copied to clipboard
interface TraceAPI

trace 的管理 API,仅支持管理,包括读取和删除。

Link copied to clipboard
interface WorkspaceAPI

用于管理工作区的 API。

Properties

Link copied to clipboard
Link copied to clipboard
abstract val appVersion: SemVer

AutoTweaker 应用版本号,正如类型名称,AutoTweaker 遵循 SemVer 规范。

Link copied to clipboard
Link copied to clipboard
abstract val i18n: CoreAPI.I18nAPI
Link copied to clipboard
abstract val log: CoreAPI.LogAPI
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val tool: CoreAPI.ToolAPI
Link copied to clipboard
abstract val trace: CoreAPI.TraceAPI
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun bash(arg: ShellExec): Flow<ShellEvent>

执行一条 Bash 命令,支持在容器内执行。

Link copied to clipboard
abstract fun chat(request: LlmRequest): Flow<LlmResult>

调用 LLM,模型、提供商必须来自配置的模型和提供商。