环境Toolset
class EnvironmentToolset @JvmOverloads constructor(environment: Environment, maxOutputChars: Int = DEFAULT_MAX_OUTPUT_CHARS) : Toolset
Toolset that gives an agent Execute, ReadFile, EditFile and WriteFile tools over an Environment and appends tool-selection rules to the system instruction on each LLM call. Execute and ReadFile output is truncated to maxOutputChars characters, and each Execute command times out after 30 seconds.
Parameters
environment
The environment used to execute commands and perform file I/O.
maxOutputChars
Maximum characters of stdout, stderr or file content returned to the model, 30,000 by default; must not be negative.
函数
Link copied to clipboard
转发至: Environment.close 在每次调用时,都依赖于该操作的“幂等性”(即多次调用会产生相同的结果)。
Link copied to clipboard
根据所提供的上下文,返回工具集中的所有工具。
Link copied to clipboard
open suspend override fun processLlmRequest(toolContext: ToolContext, llmRequest: LlmRequest): LlmRequest
该功能允许工具集处理来自大型语言模型(LLM)的请求。