Fix BadRequestError wrong arguments and remove openai dependency (#4882)
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user