跳到主要内容

aiSettingsSetToolMode

AiSuccessResponse aiSettingsSetToolMode(AiSettingsSetToolModeRequest)

PUT /api/2.0/ai/config/tool-mode

Set the tool permission mode

Stores the calling user's tool permission mode and returns the stored result. The body ({ mode }) is proxied unchanged to the DocSpace AI service, which rejects a value outside its ToolPermissionMode enum. The mode applies to every chat of the user in the portal.

Parameters​

NameInTypeDescriptionNotes
AiSettingsSetToolModeRequestbodyMap{ mode } with the AI service's ToolPermissionMode enum, proxied unchanged; the service rejects anything outside the enum.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The calling user's stored tool permission mode, as { mode }.AiSuccessResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, the caller is a guest, or the room named by entityId is one the caller cannot open. Relayed from the DocSpace AI service or the Files API.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json