AI Request-Response Transformation
Function Description
The AI Request-Response Transformation plugin modifies the header and body of requests/responses using LLM.
Execution Attributes
Plugin execution phase: Authentication Phase
Plugin execution priority: 410
Configuration Description
Name | Type | Requirement | Default | Description |
---|---|---|---|---|
request.enable | bool | required | - | Whether to enable transformation in the request phase |
request.prompt | string | required | - | Prompt used for transformation in the request phase |
response.enable | bool | required | - | Whether to enable transformation in the response phase |
response.prompt | string | required | - | Prompt used for transformation in the response phase |
provider.serviceName | string | required | - | DNS type service name, currently only supports Qwen |
provider.domain | string | required | - | LLM service domain |
provider.apiKey | string | required | - | Alibaba Cloud Dashscope service API Key |
Configuration Example
Accessing the original httpbin’s /xml interface yields:
Using the above configuration, accessing the httpbin’s /xml interface through the gateway yields: