refine OpenAi Api (#159)

This commit is contained in:
KevinHuSh
2024-03-27 17:55:45 +08:00
committed by GitHub
parent 0cb95c688e
commit bf2e3d7fc1
5 changed files with 16 additions and 12 deletions

View File

@ -29,7 +29,7 @@ def chunk(filename, binary, tenant_id, lang, callback=None, **kwargs):
except Exception as e:
callback(prog=-1, msg=str(e))
return []
img = Image.open(io.BytesIO(binary))
img = Image.open(io.BytesIO(binary)).convert('RGB')
doc = {
"docnm_kwd": filename,
"image": img