Skip to main content
LibreChat is joining ClickHouse to power the open-source Agentic Data Stack 🎉 Learn more
LibreChat

Assistants Endpoint 对象结构

此页面同时适用于 assistantsazureAssistants endpoint。

注意: 要启用 azureAssistants,请参阅 Azure OpenAI 配置以获取更多信息。

示例

endpoints:
  # azureAssistants: # <-- Azure-specific configuration has the same structure as `assistants`
    #  pollIntervalMs: 500
    #  timeoutMs: 10000
 
  assistants:
    disableBuilder: false
    # Use either `supportedIds` or `excludedIds` but not both
    supportedIds: ["asst_supportedAssistantId1", "asst_supportedAssistantId2"]
    # excludedIds: ["asst_excludedAssistantId"]
    # `privateAssistants` do not work with `supportedIds` or `excludedIds`
    # privateAssistants: false
    # (optional) Models that support retrieval, will default to latest known OpenAI models that support the feature
    # retrievalModels: ["gpt-4-turbo-preview"]
    # (optional) Assistant Capabilities available to all users. Omit the ones you wish to exclude. Defaults to list below.
    # capabilities: ["code_interpreter", "retrieval", "actions", "tools", "image_vision"]

此配置启用了 Assistants 的构建器界面,设置了 500ms 的轮询间隔以检查运行更新,并为 Assistant 运行操作设定了 10 秒的超时时间。

disableBuilder

键:

KeyTypeDescriptionExample
disableBuilderBoolean控制助手构建器界面的可见性和使用。When set to `true`, disables the builder interface for the assistant, limiting direct manual interaction.

默认值: false

示例:

disableBuilder: false

pollIntervalMs

键:

KeyTypeDescriptionExample
pollIntervalMsInteger指定用于检查运行更新或助手运行状态更改的轮询间隔(以毫秒为单位)。Specifies the polling interval in milliseconds for checking assistant run updates.

默认值: 2000

示例:

pollIntervalMs: 2500

注意: 目前,此设置仅供 Azure Assistants 使用。建议为 Azure Assistants 设置较高的值,以避免速率限制错误。

timeoutMs

键:

KeyTypeDescriptionExample
timeoutMsInteger定义助手在请求被取消前可以运行的最长时间(以毫秒为单位)。Sets a timeout in milliseconds for assistant runs. Helps manage system load by limiting total run operation time.

默认值: 180000

示例:

timeoutMs: 10000

注意: 默认值为 3 分钟(180,000 毫秒)。运行操作时间通常在 50 秒到 2 分钟之间,但也可能超过此时间。如果超过 timeoutMs 值,运行将被取消。

supportedIds

键:

KeyTypeDescriptionExample
supportedIdsArray/List of Strings支持的 assistant Id 列表Use this or `excludedIds` but not both (the `excludedIds` field will be ignored if so).

示例:

supportedIds:
  - "asst_supportedAssistantId1"
  - "asst_supportedAssistantId2"

excludedIds

键:

KeyTypeDescriptionExample
excludedIdsArray/List of Strings已排除的助理 ID 列表Use this or `supportedIds` but not both (the `excludedIds` field will be ignored if so).

示例:

excludedIds:
  - "asst_excludedAssistantId1"
  - "asst_excludedAssistantId2"

privateAssistants

键:

KeyTypeDescriptionExample
privateAssistantsBoolean控制助手是否仅对创建它们的用户可见Does not work with `supportedIds` or `excludedIds` (`supportedIds` and `excludedIds` will be ignored).

默认值: false

示例:

privateAssistants: false

retrievalModels

键:

KeyTypeDescriptionExample
retrievalModelsArray/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 模型)

示例:

retrievalModels:
  - "gpt-4-turbo-preview"

capabilities

键:

KeyTypeDescriptionExample
capabilitiesArray/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"]

示例:

capabilities:
  - "code_interpreter"
  - "retrieval"
  - "actions"
  - "tools"
  - "image_vision"

注意: 此字段为可选字段。如果省略,默认行为将包含示例中列出的所有功能。

这篇指南怎么样?