Merge main into sweep/add-reset-button-settings-dialog

This commit is contained in:
sweep-ai[bot] 2023-12-03 19:45:44 +00:00 committed by GitHub
commit 7dd0637868
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,7 @@ async def generate_image(prompt, api_key, base_url):
"prompt": prompt, "prompt": prompt,
} }
res = await client.images.generate(**image_params) res = await client.images.generate(**image_params)
await client.close()
return res.data[0].url return res.data[0].url

View File

@ -30,4 +30,6 @@ async def stream_openai_response(
full_response += content full_response += content
await callback(content) await callback(content)
await client.close()
return full_response return full_response