技能Toolset

class SkillToolset @ExperimentalEnvironmentApi constructor(source: SkillSource, environment: Environment?, scriptTimeout: Duration = DEFAULT_SCRIPT_TIMEOUT) : Toolset

Toolset exposing the skills a SkillSource provides. When environment is set, it also exposes run_skill_script, which copies the skill into skills/<skill_name>/ in the environment and runs the model's command there.

Parameters

source

Where skills and their resources are read from.

environment

Environment used to execute skill scripts.

scriptTimeout

Maximum execution time for a single skill script, 300 seconds by default. Must be positive.

构造函数(Constructors)

Link copied to clipboard
constructor(source: SkillSource, environment: Environment?, scriptTimeout: Duration = DEFAULT_SCRIPT_TIMEOUT)
constructor(source: SkillSource)

创建一个工具集,该工具集能够从指定来源读取技能信息。 source 但是无法执行他们的脚本。

类型

Link copied to clipboard

Fluent Builder for SkillToolset该功能主要为 Java 语言的调用者提供支持;如果某个属性未被设置,其值将默认使用构造函数中指定的默认值。

Link copied to clipboard
object Companion

函数

Link copied to clipboard
open override fun close()

如果提供了相应的环境配置文件(environment),则关闭该环境。 Environment.close 该操作是幂等的(idempotent)。

Link copied to clipboard
open suspend override fun getTools(readonlyContext: ReadonlyContext? = null): List<BaseTool>

根据所提供的上下文,返回工具集中的所有工具。

Link copied to clipboard
open suspend override fun processLlmRequest(toolContext: ToolContext, llmRequest: LlmRequest): LlmRequest

该功能允许工具集处理来自大型语言模型(LLM)的请求。