@@ -56,6 +56,7 @@ async def _get_prompt_input(self,
5656 adapter_name : str ,
5757 tools : Optional [List [object ]] = None ,
5858 enable_thinking : Optional [bool ] = None ,
59+ add_vision_id : Optional [bool ] = False ,
5960 ** kwargs ):
6061 """Process messages and return the required data for the inference
6162 engines.
@@ -70,6 +71,7 @@ async def _get_prompt_input(self,
7071 adapter_name ,
7172 tools = tools ,
7273 enable_thinking = enable_thinking ,
74+ add_vision_id = add_vision_id ,
7375 ** kwargs )
7476 elif isinstance (messages , List ):
7577 has_multimodal_input = any (
@@ -82,6 +84,7 @@ async def _get_prompt_input(self,
8284 adapter_name ,
8385 tools ,
8486 enable_thinking = enable_thinking ,
87+ add_vision_id = add_vision_id ,
8588 ** kwargs )
8689 else :
8790 raise RuntimeError (f'unsupported messages { messages } ' )
@@ -101,7 +104,8 @@ async def _get_prompt_input(self,
101104 self .tokenizer ,
102105 sequence_start ,
103106 tools = tools ,
104- enable_thinking = enable_thinking )
107+ enable_thinking = enable_thinking ,
108+ add_vision_id = add_vision_id )
105109 elif self .backend == 'pytorch' :
106110 # for pt engine, this module only conduct the image preprocessing
107111 # It leaves the vision embedding to the pt engine
@@ -110,7 +114,8 @@ async def _get_prompt_input(self,
110114 self .tokenizer ,
111115 sequence_start ,
112116 tools = tools ,
113- enable_thinking = enable_thinking )
117+ enable_thinking = enable_thinking ,
118+ add_vision_id = add_vision_id )
114119 return results
115120
116121 @classmethod
0 commit comments