AI RAG Configuration
Plugin Parameters
See plugin common configurations for configuration options available to all plugins.
-
embeddings_provider—object· requiredEmbedding model provider configurations.
-
azure_openai—object· requiredAzure OpenAI embedding model configurations.
-
endpoint—string· requiredAzure OpenAI embedding model endpoint.
-
api_key—string· requiredAzure OpenAI API key. The value is encrypted with AES before being stored in etcd.
-
-
-
vector_search_provider—object· requiredVector search provider configurations.
-
azure_ai_search—object· requiredConfigurations of Azure AI Search.
-
endpoint—string· requiredAzure AI Search endpoint.
-
api_key—string· requiredAzure AI Search API key. The value is encrypted with AES before being stored in etcd.
-
-
-
ssl_verify—boolean· optional · default:trueIf true, verify TLS certificates when calling the embedding and vector search endpoints. Available in API7 Enterprise from version 3.9.10 and APISIX from version 3.17.0.
Request Body Parameters
The request body should follow the below configurations.
-
ai_rag—object· requiredRequest body RAG specifications.
-
embeddings—object· requiredEmbedding specifications.
The following parameters are available if you are working with Azure OpenAI.
-
input—string· requiredInput prompt to the LLM, which will be used to compute embeddings and generate a RAG-enhanced response.
-
user—string· optionalA unique identifier representing your end user, which helps in monitoring and detecting abuse.
-
encoding_format—string· optional · default:floatValid values:
floatorbase64Data type of the returned embeddings.
-
dimensions—integer· optionalDimensions limit of the embedding model used to output the vectors. It should match the dimension of your embedding model. For instance, the dimensions for
text-embedding-ada-002are fixed at 1536. Fortext-embedding-3-smallortext-embedding-3-large, dimensions range from 1 to 1536 and 3072, respectively.
-
-
vector_search—object· requiredVector search specifications.
The following parameter is available if you are working with Azure AI Search.
-
fields—string· requiredFields for the vector search.
-
-