mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-09-12 08:29:30 -04:00
fix Equing response error with no stream
This commit is contained in:
parent
5c2809a22f
commit
c01a8539b0
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user