private static Mono<ServerWebExchange> convertBody(final ServerWebExchange exchange,
                                                       final List<HttpMessageReader<?>> readers,
                                                       final String aiResponse) {
        MediaType mediaType = exchange.getRequest().getHeaders().getContentType();
        if (MediaType.APPLICATION_JSON.isCompatibleWith(mediaType)) {
            return ServerWebExchangeUtils.rewriteRequestBody(exchange, readers, requestBodyString ->
                    Mono.just(convertBodyJson(aiResponse)));
        } else if (MediaType.APPLICATION_FORM_URLENCODED.isCompatibleWith(mediaType)) {
            return ServerWebExchangeUtils.rewriteRequestBody(exchange, readers, requestBodyString ->
                    Mono.just(convertBodyFormData(aiResponse)));
        } else {
            return Mono.just(exchange);
        }

    }
this is ai request transformer plugin.
shenyu-plugin/shenyu-plugin-ai/shenyu-plugin-ai-request-transformer/src/main/java/org/apache/shenyu/plugin/ai/transformer/request/AiRequestTransformerPlugin.java