MCPcopy Create free account
hub / github.com/Writesonic/GPTRouter / generateImageResponse

Function generateImageResponse

src/controllers/generation.controller.ts:464–474  ·  view source on GitHub ↗
(
  request: FastifyRequestTypebox<typeof GenerateImageResponseSchema>,
  reply: FastifyReplyTypebox<typeof GenerateImageResponseSchema>,
)

Source from the content-addressed store, hash-verified

462};
463
464export 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
476export const generateResponseFromImage = async (
477 request: FastifyRequestTypebox<typeof GenerateFromImageResponseSchema>,

Callers

nothing calls this directly

Calls 2

generateImagesWithDALL_EFunction · 0.85

Tested by

no test coverage detected