Skip to content

list_models

list_models(
    client_compatibility_version: int,
    *,
    config_overrides: Optional[NovaActClientConfig] = None,
) -> ListModelsResponse

Lists all available AI models that can be used for workflow execution, including their status and compatibility information.

Parameters:

  • client_compatibility_version (int) –

    The client compatibility version to filter models by compatibility.

Raises:

Source code in docs_src/capo_nova_act/_services/nova_act.py
def list_models(
    self,
    client_compatibility_version: int,
    *,
    config_overrides: Optional[NovaActClientConfig] = None,
) -> "capo_nova_act.types.list_models_response.ListModelsResponse":
    """<p>Lists all available AI models that can be used for workflow execution, including their status and compatibility information.</p>

    Args:
        client_compatibility_version: <p>The client compatibility version to filter models by compatibility.</p>

    Raises:
        capo_nova_act.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permissions to perform this action.</p>
        capo_nova_act.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Please try again later.</p>
        capo_nova_act.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please try again later.</p>
        capo_nova_act.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_nova_act.types.list_models_request.ListModelsRequest]",
    ) -> OperationResponse[
        "capo_nova_act.types.list_models_response.ListModelsResponse"
    ]:
        import capo_nova_act._operations.amazon_nova_agents_data_plane.list_models

        output, http_response = (
            capo_nova_act._operations.amazon_nova_agents_data_plane.list_models.list_models(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListModels")
    )
    input_: capo_nova_act.types.list_models_request.ListModelsRequest = {
        "client_compatibility_version": client_compatibility_version
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output