( request: FastifyRequestTypebox<typeof GenerateImageResponseSchema>, reply: FastifyReplyTypebox<typeof GenerateImageResponseSchema>, )
| 462 | }; |
| 463 | |
| 464 | export const generateImageResponse = async ( |
| 465 | request: FastifyRequestTypebox<typeof GenerateImageResponseSchema>, |
| 466 | reply: FastifyReplyTypebox<typeof GenerateImageResponseSchema>, |
| 467 | ) => { |
| 468 | const { imageVendor } = request.body; |
| 469 | if (imageVendor === ImageVendor.DALL_E) { |
| 470 | await generateImagesWithDALL_E(request, reply); |
| 471 | } else { |
| 472 | await generateImagesWithStableDiffusion(request, reply); |
| 473 | } |
| 474 | }; |
| 475 | |
| 476 | export const generateResponseFromImage = async ( |
| 477 | request: FastifyRequestTypebox<typeof GenerateFromImageResponseSchema>, |
nothing calls this directly
no test coverage detected