mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-11-01 03:21:02 +00:00
commit
693b15231d
@ -3,17 +3,14 @@ from __future__ import annotations
|
||||
import string
|
||||
import random
|
||||
import json
|
||||
import io
|
||||
import base64
|
||||
import math
|
||||
from PIL import Image
|
||||
from ...typing import ImageType
|
||||
from aiohttp import ClientSession
|
||||
from ...image import to_image, process_image, to_base64
|
||||
|
||||
image_config = {
|
||||
"maxImagePixels": 360000,
|
||||
"imageComp.ssionRate": 0.7,
|
||||
"imageCompressionRate": 0.7,
|
||||
"enableFaceBlurDebug": 0,
|
||||
}
|
||||
|
||||
|
@ -110,6 +110,7 @@ class Backend_Api:
|
||||
'provider': get_last_provider(True)
|
||||
}) + "\n"
|
||||
if isinstance(chunk, Exception):
|
||||
logging.exception(chunk)
|
||||
yield json.dumps({
|
||||
'type' : 'message',
|
||||
'message': get_error_message(chunk),
|
||||
|
Loading…
Reference in New Issue
Block a user