Skip to content

describe_language_model

describe_language_model(
    model_name: ModelName, *, config_overrides: Optional[TranscribeClientConfig] = None
) -> DescribeLanguageModelResponse

Provides information about the specified custom language model.

This operation also shows if the base language model that you used to create your custom language model has been updated. If Amazon Transcribe has updated the base model, you can create a new custom language model using the updated base model.

If you tried to create a new custom language model and the request wasn't successful, you can use DescribeLanguageModel to help identify the reason for this failure.

Parameters:

  • model_name (ModelName) –

    The name of the custom language model you want information about. Model names are case sensitive.

Raises:

  • BadRequestException –

    Your request didn't pass one or more validation tests. This can occur when the entity you're trying to delete doesn't exist or if it's in a non-terminal state (such as IN PROGRESS). See the exception message field for more information.

  • InternalFailureException –

    There was an internal error. Check the error message, correct the issue, and try your request again.

  • LimitExceededException –

    You've either sent too many requests or your input file is too long. Wait before retrying your request, or use a smaller file and try your request again.

  • NotFoundException –

    We can't find the requested resource. Check that the specified name is correct and try your request again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_transcribe/_services/transcribe.py
def describe_language_model(
    self,
    model_name: "capo_transcribe.types.model_name.ModelName",
    *,
    config_overrides: Optional[TranscribeClientConfig] = None,
) -> "capo_transcribe.types.describe_language_model_response.DescribeLanguageModelResponse":
    """<p>Provides information about the specified custom language model.</p> <p>This operation also shows if the base language model that you used to create your custom language model has been updated. If Amazon Transcribe has updated the base model, you can create a new custom language model using the updated base model.</p> <p>If you tried to create a new custom language model and the request wasn't successful, you can use <code>DescribeLanguageModel</code> to help identify the reason for this failure.</p>

    Args:
        model_name: <p>The name of the custom language model you want information about. Model names are case sensitive.</p>

    Raises:
        capo_transcribe.errors.bad_request_exception.BadRequestException: <p>Your request didn't pass one or more validation tests. This can occur when the entity you're trying to delete doesn't exist or if it's in a non-terminal state (such as <code>IN PROGRESS</code>). See the exception message field for more information.</p>
        capo_transcribe.errors.internal_failure_exception.InternalFailureException: <p>There was an internal error. Check the error message, correct the issue, and try your request again.</p>
        capo_transcribe.errors.limit_exceeded_exception.LimitExceededException: <p>You've either sent too many requests or your input file is too long. Wait before retrying your request, or use a smaller file and try your request again.</p>
        capo_transcribe.errors.not_found_exception.NotFoundException: <p>We can't find the requested resource. Check that the specified name is correct and try your request again.</p>
        capo_transcribe.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_transcribe.types.describe_language_model_request.DescribeLanguageModelRequest]",
    ) -> OperationResponse[
        "capo_transcribe.types.describe_language_model_response.DescribeLanguageModelResponse"
    ]:
        import capo_transcribe._operations.transcribe.describe_language_model

        output, http_response = (
            capo_transcribe._operations.transcribe.describe_language_model.describe_language_model(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeLanguageModel")
    )
    input_: capo_transcribe.types.describe_language_model_request.DescribeLanguageModelRequest = {
        "model_name": model_name
    }

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