Configure SQL AI Assistant using the OpenAI platform

This topic describes how to set up SQL AI Assistant and connect to a model on the OpenAI platform.

You must have created an account with the OpenAI platform.

  1. Log in to the Data Warehouse service
  2. Go to the Virtual Warehouses tab, locate the Virtual Warehouse on which you want to enable this feature, and click > Edit.
  3. Go to Configurations > Hue, select hue-safety-valve from the Configuration files drop-down menu, and add the following lines :
    [desktop]
      [[ai_interface]]
        service='openai'
    
    You can specify the model_name (optional) and define the model. If no model is defined, the default model (gpt-3.5-turbo-16k) will be used.
  4. Click Apply Changes.
You see Assistant on the Hue SQL editor, and the SQL AI Assistant will connect to the specified model on the OpenAI platform.