diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-05-18 23:13:57 +0200 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-05-18 23:13:57 +0200 |
commit | 9ddac1715f7d656ebcf0bc4d0247e9bfd32626fa (patch) | |
tree | 4a137ca4958a81272e37f952b9330a197038f83f /g4f/Provider/openai | |
parent | Fix OpenaiChat provider, improve proofofwork (diff) | |
download | gpt4free-9ddac1715f7d656ebcf0bc4d0247e9bfd32626fa.tar gpt4free-9ddac1715f7d656ebcf0bc4d0247e9bfd32626fa.tar.gz gpt4free-9ddac1715f7d656ebcf0bc4d0247e9bfd32626fa.tar.bz2 gpt4free-9ddac1715f7d656ebcf0bc4d0247e9bfd32626fa.tar.lz gpt4free-9ddac1715f7d656ebcf0bc4d0247e9bfd32626fa.tar.xz gpt4free-9ddac1715f7d656ebcf0bc4d0247e9bfd32626fa.tar.zst gpt4free-9ddac1715f7d656ebcf0bc4d0247e9bfd32626fa.zip |
Diffstat (limited to 'g4f/Provider/openai')
-rw-r--r-- | g4f/Provider/openai/har_file.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/g4f/Provider/openai/har_file.py b/g4f/Provider/openai/har_file.py index 8dcbe44e..2287d6a6 100644 --- a/g4f/Provider/openai/har_file.py +++ b/g4f/Provider/openai/har_file.py @@ -12,6 +12,7 @@ from copy import deepcopy from .crypt import decrypt, encrypt from ...requests import StreamSession +from ...cookies import get_cookies_dir from ... import debug class NoValidHarFileError(Exception): @@ -36,17 +37,14 @@ proofTokens: list = [] def readHAR(): global proofTokens - dirPath = "./" harPath = [] chatArks = [] accessToken = None cookies = {} - for root, dirs, files in os.walk(dirPath): + for root, dirs, files in os.walk(get_cookies_dir()): for file in files: if file.endswith(".har"): harPath.append(os.path.join(root, file)) - if harPath: - break if not harPath: raise NoValidHarFileError("No .har file found") for path in harPath: |