Fix BadRequestError wrong arguments and remove openai dependency (#4882)

This commit is contained in:
fzyzcjy
2025-03-29 23:16:21 +08:00
committed by GitHub
parent 19e96e5923
commit b1cfb4e972

View File

@@ -10,7 +10,6 @@ import numpy as np
import PIL import PIL
import transformers import transformers
from decord import VideoReader, cpu from decord import VideoReader, cpu
from openai import BadRequestError
from PIL import Image from PIL import Image
from sglang.srt.utils import load_audio, load_image, logger from sglang.srt.utils import load_audio, load_image, logger
@@ -252,9 +251,7 @@ class BaseMultimodalProcessor(ABC):
except Exception as e: except Exception as e:
logger.error(f"An exception occurred while loading images: {e}") logger.error(f"An exception occurred while loading images: {e}")
raise BadRequestError( raise RuntimeError(f"An exception occurred while loading images: {e}")
f"An exception occurred while loading images: {e}"
)
out = BaseMultiModalProcessorOutput( out = BaseMultiModalProcessorOutput(
mm_data_hashes=hashes, mm_data_hashes=hashes,