mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-04 14:17:28 +00:00
Revert "Image: Add the LLM-generated prompt to the API result"
This reverts commit c7ad28a4cd.
This commit is contained in:
parent
3ef428efaa
commit
56f2a9512f
2 changed files with 3 additions and 15 deletions
|
|
@ -47,16 +47,10 @@ def generations(request):
|
|||
resp = {'created': int(time.time()), 'data': []}
|
||||
for img in images:
|
||||
b64 = _image_to_base64(img)
|
||||
image_obj = {
|
||||
'revised_prompt': img.info.get('revised_prompt', request.prompt)
|
||||
}
|
||||
|
||||
if request.response_format == 'b64_json':
|
||||
image_obj['b64_json'] = b64
|
||||
resp['data'].append({'b64_json': b64})
|
||||
else:
|
||||
image_obj['url'] = f'data:image/png;base64,{b64}'
|
||||
|
||||
resp['data'].append(image_obj)
|
||||
resp['data'].append({'url': f'data:image/png;base64,{b64}'})
|
||||
|
||||
return resp
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue