@@ -141,7 +141,7 @@ def get_usage_info(self) -> dict:
141141 response = s .send (prepared , timeout = self .api_timeout )
142142 if response .status_code != 200 :
143143 err = json .loads (response .text )
144- err ["statusCode " ] = response .status_code
144+ err ["status_code " ] = response .status_code
145145 raise LLMWhispererClientException (err )
146146 return json .loads (response .text )
147147
@@ -213,15 +213,15 @@ def whisper(
213213 if url == "" and file_path == "" :
214214 raise LLMWhispererClientException (
215215 {
216- "statusCode " : - 1 ,
216+ "status_code " : - 1 ,
217217 "message" : "Either url or file_path must be provided" ,
218218 }
219219 )
220220
221221 if timeout < 0 or timeout > 200 :
222222 raise LLMWhispererClientException (
223223 {
224- "statusCode " : - 1 ,
224+ "status_code " : - 1 ,
225225 "message" : "timeout must be between 0 and 200" ,
226226 }
227227 )
@@ -243,14 +243,14 @@ def whisper(
243243 response = s .send (prepared , timeout = self .api_timeout )
244244 if response .status_code != 200 and response .status_code != 202 :
245245 message = json .loads (response .text )
246- message ["statusCode " ] = response .status_code
246+ message ["status_code " ] = response .status_code
247247 raise LLMWhispererClientException (message )
248248 if response .status_code == 202 :
249249 message = json .loads (response .text )
250- message ["statusCode " ] = response .status_code
250+ message ["status_code " ] = response .status_code
251251 return message
252252 return {
253- "statusCode " : response .status_code ,
253+ "status_code " : response .status_code ,
254254 "extracted_text" : response .text ,
255255 "whisper_hash" : response .headers ["whisper-hash" ],
256256 }
@@ -269,7 +269,7 @@ def whisper_status(self, whisper_hash: str) -> dict:
269269
270270 Returns:
271271 dict: A dictionary containing the status of the whisper operation. The keys in the
272- dictionary include 'statusCode ' and the status details.
272+ dictionary include 'status_code ' and the status details.
273273
274274 Raises:
275275 LLMWhispererClientException: If the API request fails, it raises an exception with
@@ -285,10 +285,10 @@ def whisper_status(self, whisper_hash: str) -> dict:
285285 response = s .send (prepared , timeout = self .api_timeout )
286286 if response .status_code != 200 :
287287 err = json .loads (response .text )
288- err ["statusCode " ] = response .status_code
288+ err ["status_code " ] = response .status_code
289289 raise LLMWhispererClientException (err )
290290 message = json .loads (response .text )
291- message ["statusCode " ] = response .status_code
291+ message ["status_code " ] = response .status_code
292292 return message
293293
294294 def whisper_retrieve (self , whisper_hash : str ) -> dict :
@@ -320,11 +320,11 @@ def whisper_retrieve(self, whisper_hash: str) -> dict:
320320 response = s .send (prepared , timeout = self .api_timeout )
321321 if response .status_code != 200 :
322322 err = json .loads (response .text )
323- err ["statusCode " ] = response .status_code
323+ err ["status_code " ] = response .status_code
324324 raise LLMWhispererClientException (err )
325325
326326 return {
327- "statusCode " : response .status_code ,
327+ "status_code " : response .status_code ,
328328 "extracted_text" : response .text ,
329329 }
330330
@@ -366,8 +366,8 @@ def highlight_data(self, whisper_hash: str, search_text: str) -> dict:
366366 response = s .send (prepared , timeout = self .api_timeout )
367367 if response .status_code != 200 :
368368 err = json .loads (response .text )
369- err ["statusCode " ] = response .status_code
369+ err ["status_code " ] = response .status_code
370370 raise LLMWhispererClientException (err )
371371 result = json .loads (response .text )
372- result ["statusCode " ] = response .status_code
372+ result ["status_code " ] = response .status_code
373373 return result
0 commit comments