summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Equing.py
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2023-08-22 16:36:10 +0200
committerGitHub <noreply@github.com>2023-08-22 16:36:10 +0200
commit704408202b83f763f0b25c57989027b10d7ebf71 (patch)
tree4535edae946f9cf4f2d82519054e0e64199c3968 /g4f/Provider/Equing.py
parent ~ | Merge pull request #830 (diff)
parentfix Equing response error with no stream (diff)
downloadgpt4free-704408202b83f763f0b25c57989027b10d7ebf71.tar
gpt4free-704408202b83f763f0b25c57989027b10d7ebf71.tar.gz
gpt4free-704408202b83f763f0b25c57989027b10d7ebf71.tar.bz2
gpt4free-704408202b83f763f0b25c57989027b10d7ebf71.tar.lz
gpt4free-704408202b83f763f0b25c57989027b10d7ebf71.tar.xz
gpt4free-704408202b83f763f0b25c57989027b10d7ebf71.tar.zst
gpt4free-704408202b83f763f0b25c57989027b10d7ebf71.zip
Diffstat (limited to 'g4f/Provider/Equing.py')
-rw-r--r--g4f/Provider/Equing.py3
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: