[Core] Avoid the need to pass None values to Sequence.inputs (#5099)

This commit is contained in:
Cyrus Leung
2024-05-29 16:05:01 -07:00
committed by GitHub
parent eb6c50cdc2
commit b1c255630d
7 changed files with 6 additions and 19 deletions
+2 -2
View File
@@ -249,7 +249,7 @@ class Sequence:
@property
def prompt(self) -> Optional[str]:
return self.inputs["prompt"]
return self.inputs.get("prompt")
@property
def prompt_token_ids(self) -> List[int]:
@@ -257,7 +257,7 @@ class Sequence:
@property
def multi_modal_data(self) -> Optional["MultiModalData"]:
return self.inputs["multi_modal_data"]
return self.inputs.get("multi_modal_data")
@property
def lora_int_id(self) -> int: