Defines typed dictionaries and utilities for vision chunk inputs in multimodal models.
# Source: https://github.com/vllm-project/vllm | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from abc import ABC, abstractmethod
from collections import UserDict, defaultdict
from collections.abc import Mapping, Sequence
from dataclasses import dataclass
from functools import cached_property, partial
from itertools import accumulate
from typing import (
TYPE_CHECKING,
Any,
Literal,
TypeAlias,
TypedDict,
Union,
cast,
)
import numpy as np
from PIL.Image import Image
from typing_extensions import TypeVar
from vllm.utils.collection_utils import is_
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key