Assistants Endpoint 对象结构
此页面同时适用于 assistants 和 azureAssistants endpoint。
注意: 要启用 azureAssistants,请参阅 Azure OpenAI 配置以获取更多信息。
示例
此配置启用了 Assistants 的构建器界面,设置了 500ms 的轮询间隔以检查运行更新,并为 Assistant 运行操作设定了 10 秒的超时时间。
disableBuilder
键:
| Key | Type | Description | Example |
|---|---|---|---|
| disableBuilder | Boolean | 控制助手构建器界面的可见性和使用。 | When set to `true`, disables the builder interface for the assistant, limiting direct manual interaction. |
默认值: false
示例:
pollIntervalMs
键:
| Key | Type | Description | Example |
|---|---|---|---|
| pollIntervalMs | Integer | 指定用于检查运行更新或助手运行状态更改的轮询间隔(以毫秒为单位)。 | Specifies the polling interval in milliseconds for checking assistant run updates. |
默认值: 2000
示例:
注意: 目前,此设置仅供 Azure Assistants 使用。建议为 Azure Assistants 设置较高的值,以避免速率限制错误。
timeoutMs
键:
| Key | Type | Description | Example |
|---|---|---|---|
| timeoutMs | Integer | 定义助手在请求被取消前可以运行的最长时间(以毫秒为单位)。 | Sets a timeout in milliseconds for assistant runs. Helps manage system load by limiting total run operation time. |
默认值: 180000
示例:
注意: 默认值为 3 分钟(180,000 毫秒)。运行操作时间通常在 50 秒到 2 分钟之间,但也可能超过此时间。如果超过 timeoutMs 值,运行将被取消。
supportedIds
键:
| Key | Type | Description | Example |
|---|---|---|---|
| supportedIds | Array/List of Strings | 支持的 assistant Id 列表 | Use this or `excludedIds` but not both (the `excludedIds` field will be ignored if so). |
示例:
excludedIds
键:
| Key | Type | Description | Example |
|---|---|---|---|
| excludedIds | Array/List of Strings | 已排除的助理 ID 列表 | Use this or `supportedIds` but not both (the `excludedIds` field will be ignored if so). |
示例:
privateAssistants
键:
| Key | Type | Description | Example |
|---|---|---|---|
| privateAssistants | Boolean | 控制助手是否仅对创建它们的用户可见 | Does not work with `supportedIds` or `excludedIds` (`supportedIds` and `excludedIds` will be ignored). |
默认值: false
示例:
retrievalModels
键:
| Key | Type | Description | Example |
|---|---|---|---|
| retrievalModels | Array/List of Strings | 指定支持 assistants endpoint 检索功能的模型。 | Defines the models that support retrieval capabilities for the assistants endpoint. By default, it uses the latest known OpenAI models that support the official Retrieval feature. |
默认值: [](使用已知的支持检索功能的最新 OpenAI 模型)
示例:
capabilities
键:
| Key | Type | Description | Example |
|---|---|---|---|
| capabilities | Array/List of Strings | 指定适用于 assistants endpoint 所有用户的助手功能。 | Defines the assistant capabilities that are available to all users for the assistants endpoint. You can omit the capabilities you wish to exclude from the list. |
默认值: ["code_interpreter", "image_vision", "retrieval", "actions", "tools"]
示例:
注意: 此字段为可选字段。如果省略,默认行为将包含示例中列出的所有功能。
这篇指南怎么样?