@@ -146,9 +146,12 @@ def _decrypt(
146146 choice .message is not None and choice .finish_reason != 'content_filter'
147147 and choice .message .content is not None
148148 ):
149- content = aes_gcm_decrypt_base64_string (
150- key , nonce , choice .message .content
151- )
149+ try :
150+ content = aes_gcm_decrypt_base64_string (
151+ key , nonce , choice .message .content
152+ )
153+ except Exception :
154+ pass
152155 if not decrypt_validate (choice .message .content ):
153156 content = aes_gcm_decrypt_base64_list (
154157 key , nonce , choice .message .content
@@ -309,9 +312,12 @@ async def _decrypt(
309312 choice .message is not None and choice .finish_reason != 'content_filter'
310313 and choice .message .content is not None
311314 ):
312- content = aes_gcm_decrypt_base64_string (
313- key , nonce , choice .message .content
314- )
315+ try :
316+ content = aes_gcm_decrypt_base64_string (
317+ key , nonce , choice .message .content
318+ )
319+ except Exception :
320+ pass
315321 if not decrypt_validate (choice .message .content ):
316322 content = aes_gcm_decrypt_base64_list (
317323 key , nonce , choice .message .content
0 commit comments