Skip to main content

Plugin Parameters​

See plugin common configurations for configuration options available to all plugins.

  • embeddings_provider

    object

    required


    Provider used to generate the embedding for vector retrieval.

    • azure_openai

      object

      required


      Azure OpenAI endpoint and authentication used to generate embeddings.

      • endpoint

        string

        required


        Azure OpenAI embedding model endpoint.

      • api_key

        string

        required


        Azure OpenAI API key. Encrypted at rest when data encryption is enabled for gateway configuration storage.

  • vector_search_provider

    object

    required


    Provider used to retrieve context with the generated embedding.

    • azure_ai_search

      object

      required


      Azure AI Search endpoint and authentication used for vector retrieval.

      • endpoint

        string

        required


        Azure AI Search endpoint.

      • api_key

        string

        required


        Azure AI Search API key. Encrypted at rest when data encryption is enabled for gateway configuration storage.

  • ssl_verify

    boolean

    default: true


    If true, verify TLS certificates when calling the embedding and vector search endpoints. Set to false only for temporary development or migration with an untrusted certificate.

    Introduced in API7 Enterprise 3.9.10 and APISIX 3.17.0.

Request Body Parameters​

Configure the ai_rag request object with the following fields.

  • ai_rag

    object

    required


    Retrieval input used to generate an embedding and search for context before the LLM request is proxied.

    • embeddings

      object

      required


      Input sent to Azure OpenAI to generate the embedding used for retrieval.

      • model

        string


        Azure OpenAI embedding deployment name. Required in the request body when the configured endpoint uses the Azure OpenAI v1 API. A legacy deployment-specific endpoint already identifies the deployment in its URL.

      • input

        string

        required


        Text used to generate the embedding for vector retrieval. Include the user request separately in the LLM protocol's prompt field, such as messages for Chat Completions.

      • user

        string


        A unique identifier representing your end user, which helps in monitoring and detecting abuse.

      • encoding_format

        string

        default: float

        vaild vaule:

        float or base64


        Data type of the returned embeddings.

      • dimensions

        integer


        Requested number of dimensions in the embedding output. When configured, it must match the Azure AI Search vector field dimensions. The dimensions for text-embedding-ada-002 are fixed at 1536. For text-embedding-3-small and text-embedding-3-large, supported values range from 1 to 1536 and 3072, respectively.

    • vector_search

      object

      required


      Azure AI Search vector retrieval input.

      • fields

        string

        required


        Name of the Azure AI Search vector field used for retrieval.