RAG injection with OpenAI and Redisv3.10+

Configure the AI RAG Injector plugin to inject content to use Redis as vector database and the OpenAI text-embedding-3-large model for embedding.

This example uses text-embedding-3-large, which supports up to 3072 dimensions. If you use text-embedding-ada-002 instead, you must set dimensions to exactly 1536.

Prerequisites

  • You have enabled the AI Proxy or AI Proxy Advanced plugin

  • You have an OpenAI account

  • A Redis instance.

  • Port 6379, or your custom Redis port is open and reachable from Kong Gateway.

Environment variables

  • OPENAI_API_KEY: The API key to use to connect to OpenAI.

  • REDIS_HOST: The Redis server’s host

Set up the plugin

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!