CreateAgentOptionalParams interface
可选参数。
属性
description | 新代理的说明。 |
instructions | 新代理要使用的系统说明。 |
metadata | 一组最多可以附加到对象的 16 个键/值对,用于以结构化格式存储有关该对象的其他信息。 键长度可能最多为 64 个字符,值长度可能最多为 512 个字符。 |
name | 新代理的名称。 |
response |
此代理使用的工具调用的响应格式。 |
temperature | 要使用的采样温度,介于 0 和 2 之间。 较高的值(如 0.8)将使输出更随机,而较小的值(如 0.2)将使输出更集中且更具确定性 |
tool |
代理工具使用的一组资源。 资源特定于工具类型。 例如, |
tools | 要为新代理启用的工具集合。 |
topP | 温度采样的替代方法,称为核采样,其中模型考虑具有 top_p 概率质量的令牌的结果。 所以 0.1 意味着只考虑包含前 10% 概率质量的令牌。 我们通常建议更改此设置或温度,但不要同时更改这两者。 |
继承属性
abort |
可用于中止请求的信号。 |
on |
在执行请求的操作时,每次从服务器接收响应时调用的函数。 可以多次调用。 |
request |
为此操作创建和发送 HTTP 请求时使用的选项。 |
tracing |
启用跟踪时使用的选项。 |
属性详细信息
description
新代理的说明。
description?: null | string
属性值
null | string
instructions
新代理要使用的系统说明。
instructions?: null | string
属性值
null | string
metadata
一组最多可以附加到对象的 16 个键/值对,用于以结构化格式存储有关该对象的其他信息。 键长度可能最多为 64 个字符,值长度可能最多为 512 个字符。
metadata?: null | Record<string, string>
属性值
null | Record<string, string>
name
新代理的名称。
name?: null | string
属性值
null | string
responseFormat
此代理使用的工具调用的响应格式。
responseFormat?: null | AgentsResponseFormatOption
属性值
null | AgentsResponseFormatOption
temperature
要使用的采样温度,介于 0 和 2 之间。 较高的值(如 0.8)将使输出更随机,而较小的值(如 0.2)将使输出更集中且更具确定性
temperature?: null | number
属性值
null | number
toolResources
代理工具使用的一组资源。 资源特定于工具类型。 例如,code_interpreter
工具需要文件 ID 列表,而 file_search
工具需要矢量存储 ID 列表。
toolResources?: null | ToolResources
属性值
null | ToolResources
tools
topP
温度采样的替代方法,称为核采样,其中模型考虑具有 top_p 概率质量的令牌的结果。 所以 0.1 意味着只考虑包含前 10% 概率质量的令牌。
我们通常建议更改此设置或温度,但不要同时更改这两者。
topP?: null | number
属性值
null | number
继承属性详细信息
abortSignal
onResponse
在执行请求的操作时,每次从服务器接收响应时调用的函数。 可以多次调用。
onResponse?: RawResponseCallback
属性值
继承自 OperationOptions.onResponse
requestOptions
为此操作创建和发送 HTTP 请求时使用的选项。
requestOptions?: OperationRequestOptions
属性值
继承自 OperationOptions.requestOptions
tracingOptions
启用跟踪时使用的选项。
tracingOptions?: OperationTracingOptions
属性值
继承自 OperationOptions.tracingOptions