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

Cấu trúc đối tượng Assistants endpoint

Trang này áp dụng cho cả hai endpoint assistantsazureAssistants.

Lưu ý: Để kích hoạt azureAssistants, hãy xem Cấu hình Azure OpenAI để biết thêm thông tin.

Ví dụ

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"]

Cấu hình này kích hoạt giao diện trình tạo cho các trợ lý, đặt khoảng thời gian thăm dò là 500ms để kiểm tra các cập nhật chạy và thiết lập thời gian chờ là 10 giây cho các thao tác chạy trợ lý.

disableBuilder

Khóa:

KeyTypeDescriptionExample
disableBuilderBooleanKiểm soát khả năng hiển thị và sử dụng giao diện trình tạo cho các trợ lý.When set to `true`, disables the builder interface for the assistant, limiting direct manual interaction.

Mặc định: false

Ví dụ:

disableBuilder: false

pollIntervalMs

Khóa:

KeyTypeDescriptionExample
pollIntervalMsIntegerChỉ định khoảng thời gian thăm dò tính bằng mili giây để kiểm tra các bản cập nhật chạy hoặc thay đổi trong trạng thái chạy của trợ lý.Specifies the polling interval in milliseconds for checking assistant run updates.

Mặc định: 2000

Ví dụ:

pollIntervalMs: 2500

Lưu ý: Hiện tại, tính năng này chỉ được sử dụng bởi Azure Assistants. Các giá trị cao hơn được khuyến nghị cho Azure Assistants để tránh các lỗi giới hạn tốc độ (rate limiting).

timeoutMs

Khóa:

KeyTypeDescriptionExample
timeoutMsIntegerXác định thời gian tối đa tính bằng mili giây mà một trợ lý có thể chạy trước khi yêu cầu bị hủy.Sets a timeout in milliseconds for assistant runs. Helps manage system load by limiting total run operation time.

Mặc định: 180000

Ví dụ:

timeoutMs: 10000

Lưu ý: Mặc định là 3 phút (180.000 ms). Thời gian chạy thao tác có thể dao động từ 50 giây đến 2 phút nhưng cũng có thể vượt quá khoảng thời gian này. Nếu giá trị timeoutMs bị vượt quá, quá trình chạy sẽ bị hủy.

supportedIds

Khóa:

KeyTypeDescriptionExample
supportedIdsArray/List of StringsDanh sách các ID trợ lý được hỗ trợUse this or `excludedIds` but not both (the `excludedIds` field will be ignored if so).

Ví dụ:

supportedIds:
  - "asst_supportedAssistantId1"
  - "asst_supportedAssistantId2"

excludedIds

Khóa:

KeyTypeDescriptionExample
excludedIdsArray/List of StringsDanh sách các ID trợ lý bị loại trừUse this or `supportedIds` but not both (the `excludedIds` field will be ignored if so).

Ví dụ:

excludedIds:
  - "asst_excludedAssistantId1"
  - "asst_excludedAssistantId2"

privateAssistants

Khóa:

KeyTypeDescriptionExample
privateAssistantsBooleanKiểm soát việc liệu các trợ lý có ở chế độ riêng tư đối với người dùng đã tạo ra chúng hay khôngDoes not work with `supportedIds` or `excludedIds` (`supportedIds` and `excludedIds` will be ignored).

Mặc định: false

Ví dụ:

privateAssistants: false

retrievalModels

Khóa:

KeyTypeDescriptionExample
retrievalModelsArray/List of StringsChỉ định các model hỗ trợ truy xuất cho endpoint assistants.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.

Mặc định: [] (sử dụng các model OpenAI mới nhất được biết đến có hỗ trợ truy xuất)

Ví dụ:

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

capabilities

Khóa:

KeyTypeDescriptionExample
capabilitiesArray/List of StringsChỉ định các khả năng của trợ lý có sẵn cho tất cả người dùng đối với endpoint assistants.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.

Mặc định: ["code_interpreter", "image_vision", "retrieval", "actions", "tools"]

Ví dụ:

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

Lưu ý: Trường này là tùy chọn. Nếu bỏ qua, hành vi mặc định là bao gồm tất cả các khả năng được liệt kê trong ví dụ.

Hướng dẫn này thế nào?