@@ -235,15 +235,18 @@ def _parse_sync(self) -> PredictResponse:
235
235
)
236
236
custom_endpoint : Optional [Endpoint ] = None
237
237
if self .parsed_args .product_name == "custom" :
238
+ include_words = False
238
239
custom_endpoint = self .client .create_endpoint (
239
240
self .parsed_args .endpoint_name ,
240
241
self .parsed_args .account_name ,
241
242
self .parsed_args .api_version ,
242
243
)
244
+ else :
245
+ include_words = self .parsed_args .include_words
243
246
return self .client .parse (
244
- self .document_info .doc_class ,
245
- self .input_doc ,
246
- self . parsed_args . include_words ,
247
+ product_class = self .document_info .doc_class ,
248
+ input_source = self .input_doc ,
249
+ include_words = include_words ,
247
250
page_options = page_options ,
248
251
endpoint = custom_endpoint ,
249
252
)
@@ -257,15 +260,18 @@ def _parse_async(self) -> AsyncPredictResponse:
257
260
)
258
261
custom_endpoint : Optional [Endpoint ] = None
259
262
if self .parsed_args .product_name == "custom" :
263
+ include_words = False
260
264
custom_endpoint = self .client .create_endpoint (
261
265
self .parsed_args .endpoint_name ,
262
266
self .parsed_args .account_name ,
263
267
self .parsed_args .api_version ,
264
268
)
269
+ else :
270
+ include_words = self .parsed_args .include_words
265
271
return self .client .enqueue_and_parse (
266
- self .document_info .doc_class ,
267
- self .input_doc ,
268
- self . parsed_args . include_words ,
272
+ product_class = self .document_info .doc_class ,
273
+ input_source = self .input_doc ,
274
+ include_words = include_words ,
269
275
page_options = page_options ,
270
276
endpoint = custom_endpoint ,
271
277
)
0 commit comments