Co-authored-by: Swapnil Parekh <swapnilp@ibm.com> Co-authored-by: Joe G <joseph.granados@h2o.ai> Co-authored-by: Antoni Baum <antoni.baum@protonmail.com>
31 lines
633 B
Python
31 lines
633 B
Python
from dataclasses import dataclass
|
|
|
|
from vllm.adapter_commons.request import AdapterRequest
|
|
|
|
|
|
@dataclass
|
|
class PromptAdapterRequest(AdapterRequest):
|
|
"""
|
|
Request for a Prompt adapter.
|
|
"""
|
|
|
|
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
|