Constructors
constructor
- new ImageGenerator(openai, logger): ImageGenerator
Parameters
- openai: OpenAI
- logger: ILogger
Properties
Private
Readonly
logger
logger: ILogger
Private
Readonly
openai
openai: OpenAI
Methods
generateImage
- generateImage(prompt, size?, model?): Promise<string>
Parameters
- prompt: string
- size: ImageSize = "512x512"
- model: Model = "dall-e-3"
Returns Promise<string>
generateImages
- generateImages(prompt, numberOfImages, size?, model?): Promise<string[]>
Parameters
- prompt: string
- numberOfImages: 1 | 2 | 3 | 4 | 5
- size: ImageSize = "512x512"
- model: Model = "dall-e-3"
Returns Promise<string[]>
Class used to generate images