RAHB-REALTORS-Association / chat2gpt

Chat²GPT is a ChatGPT (and DALL·E 2/3, and ElevenLabs) chat bot for Google Chat. 🤖💬
https://chat2gpt.oncornerstone.app
MIT License
11 stars 1 forks source link

Split out image generation function #75

Closed justinh-rahb closed 1 year ago

justinh-rahb commented 1 year ago

Summary

Introduced a new utility function, generate_image, to abstract the OpenAI image generation process.

Description

To enhance code clarity and provide a better abstraction, we've encapsulated the openai.Image.create method in a dedicated function named generate_image. This function simplifies the process of generating images using OpenAI's Image API and can be extended or modified more easily in the future.

Related Issue(s)

47

Motivation and Context

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

Checklist:

Go over all the following points, and put an x in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!