xinference.client.Client.abort_request#

Client.abort_request(model_uid: str, request_id: str, block_duration: int = 30)[源代码]#

Abort a request. Abort a submitted request. If the request is finished or not found, this method will be a no-op. Currently, this interface is only supported when batching is enabled for models on transformers backend.

参数:
  • model_uid (str) -- Model uid.

  • request_id (str) -- Request id.

  • block_duration (int) -- The duration to make the request id abort. If set to 0, the abort_request will be immediate, which may prevent it from taking effect if it arrives before the request operation.

返回:

Return empty dict.

返回类型:

Dict