@@ -78,6 +78,15 @@ def register(self, subparsers: _SubParsersAction) -> ArgumentParser:
7878 "- raw: full JSON object\n "
7979 ),
8080 )
81+ parser .add_argument (
82+ "-w" ,
83+ "--webhook-id" ,
84+ dest = "webhook_ids" ,
85+ action = "append" ,
86+ help = "Specify a webhook by ID. May be used multiple times." ,
87+ required = False ,
88+ default = None ,
89+ )
8190 self .configure_product_options (parser )
8291 parser .add_argument ("path" , help = "The path of the file to parse." )
8392 return parser
@@ -98,13 +107,14 @@ def execute(
98107 """Run the inference for ``parsed_args`` using ``client_factory``."""
99108 api_key = getattr (parsed_args , "api_key" , None )
100109 model_id = parsed_args .model_id
110+ webhook_ids = getattr (parsed_args , "webhook_ids" , None )
101111 alias = getattr (parsed_args , "alias" , None )
102112 output_type = OutputType (
103113 getattr (parsed_args , "output" , OutputType .SUMMARY .value )
104114 )
105115
106116 client = client_factory (api_key )
107- params = self .build_parameters (parsed_args , model_id , alias )
117+ params = self .build_parameters (parsed_args , model_id , alias , webhook_ids )
108118 input_source = _build_input_source (parsed_args .path )
109119 response : (
110120 ExtractionResponse
@@ -126,6 +136,7 @@ def build_parameters(
126136 parsed_args : Namespace ,
127137 model_id : str ,
128138 alias : str | None ,
139+ webhook_ids : list [str ] | None ,
129140 ) -> BaseParameters :
130141 """Build the V2 inference parameters for this product."""
131142
0 commit comments