Creates a new Story instance
The authenticated OpenAI client
Story parameters including prompt, story content, and temperature
Optional, the model to use. Defaults to gpt-5-mini. Note: gpt-5-mini only supports temperature=1 (default)
Optional logger instance for debugging. Defaults to console
Private Readonly chatReadonly contentPrivate Readonly creationPrivate Readonly loggerOptional logger instance for debugging. Defaults to console
Private Readonly openaiThe authenticated OpenAI client
Readonly promptReadonly temperatureGenerates an image for the story using DALL-E
Optional, the size of the image. Defaults to "1024x1024"
Optional, the DALL-E model to use. Defaults to "dall-e-3"
A Promise that resolves to the URL of the generated image
Static generateUtility method which allows a Story object to be generated from a prompt with a story
The prompt to generate the story from
The authenticated OpenAI client
Optional, the model to use. Defaults to gpt-5-mini. Note: gpt-5-mini only supports temperature=1 (default)
Optional logger instance for debugging. Defaults to console
A Promise that resolves to a Story instance
Story object which contains a prompt and story and can generate a title and an image