(
c: ImageContext,
originalPrompt: string,
safeParams: ImageParams,
)
| 349 | } |
| 350 | |
| 351 | async function generateImageResult( |
| 352 | c: ImageContext, |
| 353 | originalPrompt: string, |
| 354 | safeParams: ImageParams, |
| 355 | ): Promise<ImageGenerationResult> { |
| 356 | const prompt = sanitizeString(String(originalPrompt)); |
| 357 | |
| 358 | const result = await createAndReturnImageCached( |
| 359 | prompt, |
| 360 | safeParams, |
| 361 | originalPrompt, |
| 362 | createAuthResult(c), |
| 363 | ); |
| 364 | |
| 365 | if (result.isChild && result.isMature) { |
| 366 | await sleep(5000); |
| 367 | } |
| 368 | |
| 369 | return result; |
| 370 | } |
| 371 | |
| 372 | async function generateVideoResult( |
| 373 | c: ImageContext, |
no test coverage detected