summaryrefslogtreecommitdiffstats
path: root/g4f
diff options
context:
space:
mode:
authorzengrr <47846202+zeng-rr@users.noreply.github.com>2023-08-22 09:07:22 +0200
committerzengrr <47846202+zeng-rr@users.noreply.github.com>2023-08-22 09:07:22 +0200
commitc01a8539b0fd9449436904c26d6e98a28ebdf73a (patch)
treecbb08bdf0bd7a7e2f172380c7a04c40f0846435f /g4f
parentset encoding and temperature (diff)
downloadgpt4free-c01a8539b0fd9449436904c26d6e98a28ebdf73a.tar
gpt4free-c01a8539b0fd9449436904c26d6e98a28ebdf73a.tar.gz
gpt4free-c01a8539b0fd9449436904c26d6e98a28ebdf73a.tar.bz2
gpt4free-c01a8539b0fd9449436904c26d6e98a28ebdf73a.tar.lz
gpt4free-c01a8539b0fd9449436904c26d6e98a28ebdf73a.tar.xz
gpt4free-c01a8539b0fd9449436904c26d6e98a28ebdf73a.tar.zst
gpt4free-c01a8539b0fd9449436904c26d6e98a28ebdf73a.zip
Diffstat (limited to 'g4f')
-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: