@@ -34,14 +34,14 @@ class ChatConfig:
34
34
35
35
@staticmethod
36
36
def add_cli_args (parser : "ArgumentParser" ) -> None :
37
- parser .add_argument ("--name" , type = str )
38
- parser .add_argument ("--path" , type = str )
39
- parser .add_argument ("--device" , type = int , nargs = "+" )
40
- parser .add_argument ("--port" , type = int )
41
- parser .add_argument ("--maxlen" , type = int , default = 2048 )
42
- parser .add_argument ("--agent_type" , type = str , choices = list_agents (), default = "react" )
43
- parser .add_argument ("--template" , type = str , default = None )
44
- parser .add_argument ("--gen_config" , type = str , default = None )
37
+ parser .add_argument ("--name" , type = str , required = True , help = "Model name." )
38
+ parser .add_argument ("--path" , type = str , required = True , help = "Model path or hub id." )
39
+ parser .add_argument ("--device" , type = int , nargs = "+" , required = True , help = "Device ids." )
40
+ parser .add_argument ("--port" , type = int , required = True , help = "API port." )
41
+ parser .add_argument ("--maxlen" , type = int , default = 2048 , help = "Max sequence length." )
42
+ parser .add_argument ("--agent_type" , type = str , choices = list_agents (), default = "react" , help = "Agent type." )
43
+ parser .add_argument ("--template" , type = str , default = None , help = "Template path." )
44
+ parser .add_argument ("--gen_config" , type = str , default = None , help = "Generation config path." )
45
45
46
46
@classmethod
47
47
def from_cli_args (cls , args : "Namespace" ) -> Self :
@@ -130,7 +130,7 @@ async def _generate(self, messages: List[Dict[str, str]], request_id: str, **gen
130
130
stop_token_ids = self ._generation_config .eos_token_id + gen_kwargs .pop ("stop_token_ids" , []),
131
131
)
132
132
result_generator = self ._engine .generate (
133
- prompt = None , sampling_params = sampling_params , request_id = request_id , prompt_token_ids = input_ids
133
+ inputs = { "prompt_token_ids" : input_ids } , sampling_params = sampling_params , request_id = request_id
134
134
)
135
135
return result_generator
136
136
0 commit comments