@@ -66,11 +66,13 @@ def __init__(self, endpoint, credential, **kwargs):
66
66
# type: (str, Union[AzureKeyCredential, TokenCredential], Any) -> None
67
67
68
68
authentication_policy = get_authentication_policy (credential )
69
+ polling_interval = kwargs .pop ("polling_interval" , POLLING_INTERVAL )
69
70
self ._client = FormRecognizer (
70
71
endpoint = endpoint ,
71
72
credential = credential , # type: ignore
72
73
sdk_moniker = USER_AGENT ,
73
74
authentication_policy = authentication_policy ,
75
+ polling_interval = polling_interval ,
74
76
** kwargs
75
77
)
76
78
@@ -111,7 +113,7 @@ def begin_recognize_receipts(self, receipt, **kwargs):
111
113
:caption: Recognize US sales receipt fields.
112
114
"""
113
115
114
- polling_interval = kwargs .pop ("polling_interval" , POLLING_INTERVAL )
116
+ polling_interval = kwargs .pop ("polling_interval" , self . _client . _config . polling_interval )
115
117
continuation_token = kwargs .pop ("continuation_token" , None )
116
118
content_type = kwargs .pop ("content_type" , None )
117
119
if content_type == "application/json" :
@@ -162,7 +164,7 @@ def begin_recognize_receipts_from_url(self, receipt_url, **kwargs):
162
164
:caption: Recognize US sales receipt fields from a URL.
163
165
"""
164
166
165
- polling_interval = kwargs .pop ("polling_interval" , POLLING_INTERVAL )
167
+ polling_interval = kwargs .pop ("polling_interval" , self . _client . _config . polling_interval )
166
168
continuation_token = kwargs .pop ("continuation_token" , None )
167
169
include_text_content = kwargs .pop ("include_text_content" , False )
168
170
@@ -210,7 +212,7 @@ def begin_recognize_content(self, form, **kwargs):
210
212
:caption: Recognize text and content/layout information from a form.
211
213
"""
212
214
213
- polling_interval = kwargs .pop ("polling_interval" , POLLING_INTERVAL )
215
+ polling_interval = kwargs .pop ("polling_interval" , self . _client . _config . polling_interval )
214
216
continuation_token = kwargs .pop ("continuation_token" , None )
215
217
content_type = kwargs .pop ("content_type" , None )
216
218
if content_type == "application/json" :
@@ -246,7 +248,7 @@ def begin_recognize_content_from_url(self, form_url, **kwargs):
246
248
:raises ~azure.core.exceptions.HttpResponseError:
247
249
"""
248
250
249
- polling_interval = kwargs .pop ("polling_interval" , POLLING_INTERVAL )
251
+ polling_interval = kwargs .pop ("polling_interval" , self . _client . _config . polling_interval )
250
252
continuation_token = kwargs .pop ("continuation_token" , None )
251
253
252
254
return self ._client .begin_analyze_layout_async (
@@ -296,7 +298,7 @@ def begin_recognize_custom_forms(self, model_id, form, **kwargs):
296
298
raise ValueError ("model_id cannot be None or empty." )
297
299
298
300
cls = kwargs .pop ("cls" , None )
299
- polling_interval = kwargs .pop ("polling_interval" , POLLING_INTERVAL )
301
+ polling_interval = kwargs .pop ("polling_interval" , self . _client . _config . polling_interval )
300
302
continuation_token = kwargs .pop ("continuation_token" , None )
301
303
content_type = kwargs .pop ("content_type" , None )
302
304
if content_type == "application/json" :
@@ -348,7 +350,7 @@ def begin_recognize_custom_forms_from_url(self, model_id, form_url, **kwargs):
348
350
raise ValueError ("model_id cannot be None or empty." )
349
351
350
352
cls = kwargs .pop ("cls" , None )
351
- polling_interval = kwargs .pop ("polling_interval" , POLLING_INTERVAL )
353
+ polling_interval = kwargs .pop ("polling_interval" , self . _client . _config . polling_interval )
352
354
continuation_token = kwargs .pop ("continuation_token" , None )
353
355
include_text_content = kwargs .pop ("include_text_content" , False )
354
356
0 commit comments