diff options
author | Bagus Indrayana <bagusindrayanaindo@gmail.com> | 2023-07-11 19:13:24 +0200 |
---|---|---|
committer | Bagus Indrayana <bagusindrayanaindo@gmail.com> | 2023-07-11 19:13:24 +0200 |
commit | 659e2f4ff08b46bdcc2420b705eac47da683a3a4 (patch) | |
tree | 398418bf246a9e9a5ea62b66406efcd41253200e /testing/binghuan/BingHuan.py | |
parent | check multiple messages (diff) | |
download | gpt4free-659e2f4ff08b46bdcc2420b705eac47da683a3a4.tar gpt4free-659e2f4ff08b46bdcc2420b705eac47da683a3a4.tar.gz gpt4free-659e2f4ff08b46bdcc2420b705eac47da683a3a4.tar.bz2 gpt4free-659e2f4ff08b46bdcc2420b705eac47da683a3a4.tar.lz gpt4free-659e2f4ff08b46bdcc2420b705eac47da683a3a4.tar.xz gpt4free-659e2f4ff08b46bdcc2420b705eac47da683a3a4.tar.zst gpt4free-659e2f4ff08b46bdcc2420b705eac47da683a3a4.zip |
Diffstat (limited to '')
-rw-r--r-- | testing/binghuan/BingHuan.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testing/binghuan/BingHuan.py b/testing/binghuan/BingHuan.py index c4a65309..ce36b1f2 100644 --- a/testing/binghuan/BingHuan.py +++ b/testing/binghuan/BingHuan.py @@ -13,13 +13,13 @@ def _create_completion(model: str, messages: list, stream: bool, **kwargs): config = json.dumps({ 'messages': messages, 'model': model}, separators=(',', ':')) - cmd = ['python', f'{path}/helpers/binghuan.py', config] p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - + for line in iter(p.stdout.readline, b''): - yield line.decode('cp1252') #[:-1] + yield line.decode('utf-8') + # params = f'g4f.Providers.{os.path.basename(__file__)[:-3]} supports: ' + \ |