@@ -41,7 +41,7 @@ def create_transcript(
41
41
by_alias = True ,
42
42
),
43
43
)
44
- if response .status_code != httpx .codes .ok :
44
+ if response .status_code != httpx .codes .OK :
45
45
raise types .TranscriptError (
46
46
f"failed to transcribe url { request .audio_url } : { _get_error_message (response )} "
47
47
)
@@ -57,7 +57,7 @@ def get_transcript(
57
57
f"{ ENDPOINT_TRANSCRIPT } /{ transcript_id } " ,
58
58
)
59
59
60
- if response .status_code != httpx .codes .ok :
60
+ if response .status_code != httpx .codes .OK :
61
61
raise types .TranscriptError (
62
62
f"failed to retrieve transcript { transcript_id } : { _get_error_message (response )} " ,
63
63
)
@@ -73,7 +73,7 @@ def delete_transcript(
73
73
f"{ ENDPOINT_TRANSCRIPT } /{ transcript_id } " ,
74
74
)
75
75
76
- if response .status_code != httpx .codes .ok :
76
+ if response .status_code != httpx .codes .OK :
77
77
raise types .TranscriptError (
78
78
f"failed to delete transcript { transcript_id } : { _get_error_message (response )} " ,
79
79
)
@@ -100,7 +100,7 @@ def upload_file(
100
100
content = audio_file ,
101
101
)
102
102
103
- if response .status_code != httpx .codes .ok :
103
+ if response .status_code != httpx .codes .OK :
104
104
raise types .TranscriptError (
105
105
f"Failed to upload audio file: { _get_error_message (response )} "
106
106
)
@@ -125,7 +125,7 @@ def export_subtitles_srt(
125
125
params = params ,
126
126
)
127
127
128
- if response .status_code != httpx .codes .ok :
128
+ if response .status_code != httpx .codes .OK :
129
129
raise types .TranscriptError (
130
130
f"failed to export SRT for transcript { transcript_id } : { _get_error_message (response )} "
131
131
)
@@ -150,7 +150,7 @@ def export_subtitles_vtt(
150
150
params = params ,
151
151
)
152
152
153
- if response .status_code != httpx .codes .ok :
153
+ if response .status_code != httpx .codes .OK :
154
154
raise types .TranscriptError (
155
155
f"failed to export VTT for transcript { transcript_id } : { _get_error_message (response )} "
156
156
)
@@ -172,7 +172,7 @@ def word_search(
172
172
),
173
173
)
174
174
175
- if response .status_code != httpx .codes .ok :
175
+ if response .status_code != httpx .codes .OK :
176
176
raise types .TranscriptError (
177
177
f"failed to search words in transcript { transcript_id } : { _get_error_message (response )} "
178
178
)
@@ -223,7 +223,7 @@ def get_sentences(
223
223
f"{ ENDPOINT_TRANSCRIPT } /{ transcript_id } /sentences" ,
224
224
)
225
225
226
- if response .status_code != httpx .codes .ok :
226
+ if response .status_code != httpx .codes .OK :
227
227
raise types .TranscriptError (
228
228
f"failed to retrieve sentences for transcript { transcript_id } : { _get_error_message (response )} "
229
229
)
@@ -239,7 +239,7 @@ def get_paragraphs(
239
239
f"{ ENDPOINT_TRANSCRIPT } /{ transcript_id } /paragraphs" ,
240
240
)
241
241
242
- if response .status_code != httpx .codes .ok :
242
+ if response .status_code != httpx .codes .OK :
243
243
raise types .TranscriptError (
244
244
f"failed to retrieve paragraphs for transcript { transcript_id } : { _get_error_message (response )} "
245
245
)
@@ -262,7 +262,7 @@ def list_transcripts(
262
262
),
263
263
)
264
264
265
- if response .status_code != httpx .codes .ok :
265
+ if response .status_code != httpx .codes .OK :
266
266
raise types .AssemblyAIError (
267
267
f"failed to retrieve transcripts: { _get_error_message (response )} "
268
268
)
@@ -283,7 +283,7 @@ def lemur_question(
283
283
timeout = http_timeout ,
284
284
)
285
285
286
- if response .status_code != httpx .codes .ok :
286
+ if response .status_code != httpx .codes .OK :
287
287
raise types .LemurError (
288
288
f"failed to call Lemur questions: { _get_error_message (response )} "
289
289
)
@@ -304,7 +304,7 @@ def lemur_summarize(
304
304
timeout = http_timeout ,
305
305
)
306
306
307
- if response .status_code != httpx .codes .ok :
307
+ if response .status_code != httpx .codes .OK :
308
308
raise types .LemurError (
309
309
f"failed to call Lemur summary: { _get_error_message (response )} "
310
310
)
@@ -325,7 +325,7 @@ def lemur_action_items(
325
325
timeout = http_timeout ,
326
326
)
327
327
328
- if response .status_code != httpx .codes .ok :
328
+ if response .status_code != httpx .codes .OK :
329
329
raise types .LemurError (
330
330
f"failed to call Lemur action items: { _get_error_message (response )} "
331
331
)
@@ -346,7 +346,7 @@ def lemur_task(
346
346
timeout = http_timeout ,
347
347
)
348
348
349
- if response .status_code != httpx .codes .ok :
349
+ if response .status_code != httpx .codes .OK :
350
350
raise types .LemurError (
351
351
f"failed to call Lemur task: { _get_error_message (response )} "
352
352
)
@@ -364,7 +364,7 @@ def lemur_purge_request_data(
364
364
timeout = http_timeout ,
365
365
)
366
366
367
- if response .status_code != httpx .codes .ok :
367
+ if response .status_code != httpx .codes .OK :
368
368
raise types .LemurError (
369
369
f"Failed to purge LeMUR request data for provided request ID: { request .request_id } . Error: { _get_error_message (response )} "
370
370
)
@@ -385,7 +385,7 @@ def lemur_get_response_data(
385
385
timeout = http_timeout ,
386
386
)
387
387
388
- if response .status_code != httpx .codes .ok :
388
+ if response .status_code != httpx .codes .OK :
389
389
raise types .LemurError (
390
390
f"Failed to get LeMUR response data for provided request ID: { request_id } . Error: { _get_error_message (response )} "
391
391
)
@@ -409,7 +409,7 @@ def create_temporary_token(
409
409
timeout = http_timeout ,
410
410
)
411
411
412
- if response .status_code != httpx .codes .ok :
412
+ if response .status_code != httpx .codes .OK :
413
413
raise types .AssemblyAIError (
414
414
f"Failed to create temporary token: { _get_error_message (response )} "
415
415
)
0 commit comments