fix linting error

This commit is contained in:
Ishaan Jaffer 2025-10-04 11:40:47 -07:00
parent 7a41c09529
commit cdfb53dd81

View file

@ -6,9 +6,10 @@ Why separate file? Make it easy to see how transformation works
Docs - https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-marengo.html
"""
from typing import List, Optional, Union
from typing import List, Optional, Union, cast
from litellm.types.llms.bedrock import (
TWELVELABS_EMBEDDING_INPUT_TYPES,
TwelveLabsAsyncInvokeRequest,
TwelveLabsMarengoEmbeddingRequest,
TwelveLabsOutputDataConfig,
@ -90,7 +91,10 @@ class TwelveLabsMarengoEmbeddingConfig:
- S3 URLs for all media types (async-invoke only)
"""
# Get input_type or default to "text"
input_type = inference_params.get("inputType") or inference_params.get("input_type") or "text"
input_type = cast(
TWELVELABS_EMBEDDING_INPUT_TYPES,
inference_params.get("inputType") or inference_params.get("input_type") or "text"
)
# Validate that async-invoke is used for video/audio
if input_type in ["video", "audio"] and not async_invoke_route: