diff options
author | Bagus Indrayana <bagusindrayanaindo@gmail.com> | 2023-08-24 12:23:55 +0200 |
---|---|---|
committer | Bagus Indrayana <bagusindrayanaindo@gmail.com> | 2023-08-24 12:23:55 +0200 |
commit | c9d2f060906ceffe13cccbf9cf049fa614dc3707 (patch) | |
tree | 7c18afd174d8ca192a5b3042e0a381f01c0dba08 /g4f/Provider/Equing.py | |
parent | add provider (diff) | |
parent | ~ | Merge pull request #829 (diff) | |
download | gpt4free-c9d2f060906ceffe13cccbf9cf049fa614dc3707.tar gpt4free-c9d2f060906ceffe13cccbf9cf049fa614dc3707.tar.gz gpt4free-c9d2f060906ceffe13cccbf9cf049fa614dc3707.tar.bz2 gpt4free-c9d2f060906ceffe13cccbf9cf049fa614dc3707.tar.lz gpt4free-c9d2f060906ceffe13cccbf9cf049fa614dc3707.tar.xz gpt4free-c9d2f060906ceffe13cccbf9cf049fa614dc3707.tar.zst gpt4free-c9d2f060906ceffe13cccbf9cf049fa614dc3707.zip |
Diffstat (limited to 'g4f/Provider/Equing.py')
-rw-r--r-- | g4f/Provider/Equing.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/g4f/Provider/Equing.py b/g4f/Provider/Equing.py index bcf6cff9..90c865d9 100644 --- a/g4f/Provider/Equing.py +++ b/g4f/Provider/Equing.py @@ -53,6 +53,9 @@ class Equing(ABC): response = requests.post('https://next.eqing.tech/api/openai/v1/chat/completions', headers=headers, json=json_data, stream=stream) + if not stream: + yield response.json()["choices"][0]["message"]["content"] + return for line in response.iter_content(chunk_size=1024): if line: |