Skip to content

vllm.prompt_adapter.request

PromptAdapterRequest

Bases: Struct

Request for a Prompt adapter.

Source code in vllm/prompt_adapter/request.py
class PromptAdapterRequest(
        msgspec.Struct,
        array_like=True,  # type: ignore[call-arg]
        omit_defaults=True,  # type: ignore[call-arg]
        frozen=True):  # type: ignore[call-arg]
    """
    Request for a Prompt adapter.
    """
    __metaclass__ = AdapterRequest

    prompt_adapter_name: str
    prompt_adapter_id: int
    prompt_adapter_local_path: str
    prompt_adapter_num_virtual_tokens: int

    def __hash__(self):
        return super().__hash__()

    @property
    def adapter_id(self):
        return self.prompt_adapter_id

    @property
    def name(self):
        return self.prompt_adapter_name

    @property
    def local_path(self):
        return self.prompt_adapter_local_path

__metaclass__ class-attribute instance-attribute

__metaclass__ = AdapterRequest

adapter_id property

adapter_id

local_path property

local_path

name property

name

prompt_adapter_id instance-attribute

prompt_adapter_id: int

prompt_adapter_local_path instance-attribute

prompt_adapter_local_path: str

prompt_adapter_name instance-attribute

prompt_adapter_name: str

prompt_adapter_num_virtual_tokens instance-attribute

prompt_adapter_num_virtual_tokens: int

__hash__

__hash__()
Source code in vllm/prompt_adapter/request.py
def __hash__(self):
    return super().__hash__()