fix Equing response error with no stream

pull/832/head
zengrr 11 months ago
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…
Cancel
Save