AI Request Transformer Policy

Translate a request body

Configure the AI Request Transformer policy to use OpenAI GPT-4 to translate the client request to a different language. In this example, we’ll translate the client’s question to French.

Prerequisites

  • You have an OpenAI subscription.

Environment variables

  • OPENAI_API_KEY: An API key to connect to the OpenAI API.

Set up the policy

Attach the policy

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!