Hi all! I'm having a lot of trouble with super slow responses (2-4 minutes) when generating images via the node openai package. Locally everything works just fine, i.e. the image is generated within 20 sec, but performing the exact same calls on staging and production takes terribly long. Is anybody else running into similar issues, and any ideas on how te resolve it? Some info about my stack:
- sveltekit application running on vercel
- most up te date openai package (4.20.0)
- calling the generation from a serverless function as below. Where the prompt is a title of a recipe, like "Glazed salmon with baked potatoes"
const [generateImageError, generatedImage] = await to(
openai.images.generate({
model: 'dall-e-3',
prompt: recipeImagePrompt,
style: 'vivid',
response_format: 'b64_json',
size: '1024x1024',
quality: 'standard',
n: 1
})
);