From 87f8007345bd5c92b79730bde711cf19eda70909 Mon Sep 17 00:00:00 2001 From: razrab Date: Tue, 24 Oct 2023 19:30:57 +0300 Subject: Update GetGpt provider for Debian python3-pycryptodome compatibility Try to import AES from Cryptodome.Cipher if Crypto.Cipher caused error. --- g4f/Provider/deprecated/GetGpt.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'g4f/Provider/deprecated/GetGpt.py') diff --git a/g4f/Provider/deprecated/GetGpt.py b/g4f/Provider/deprecated/GetGpt.py index a5de1d29..0fbb5b87 100644 --- a/g4f/Provider/deprecated/GetGpt.py +++ b/g4f/Provider/deprecated/GetGpt.py @@ -5,7 +5,10 @@ import os import uuid import requests -from Crypto.Cipher import AES +try: + from Crypto.Cipher import AES +except ImportError: + from Cryptodome.Cipher import AES from ...typing import Any, CreateResult from ..base_provider import BaseProvider -- cgit v1.2.3