[Core] Avoid the need to pass None values to Sequence.inputs (#5099)
This commit is contained in:
+2
-2
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user