You can use your OpenAI or Azure OpenAI account to assist you when assessing and prioritizing violations in the Violations Explorer. See CVE Match.

Functionality has been tested on the embedding model text-embedding-ada-002.

Configuring OpenAI Settings

To configure OpenAI settings, open the openai.json file located in <DTP_DATA_DIR>/conf directory.

Default contents of the openai.json file
{ 
  "enabled": false, 
  "provider": "openAi", 
  "openAiSettings": { 
    "apiKey": "api key" 
  }, 
  "azureOpenAiSettings": { 
    "apiKey": "api key",       
    "resourceName": "azure resource", 
    "embeddingsDeploymentName": "deployment name" 
  }
}

DTP must be restarted after the openai.json file is modified for the new settings to take effect.

Below is a description of the attributes in the file, in additional to option attributes that can be added.

AttributeValueDescription
enabledboolean

Enables or disables OpenAI settings. Set to true to enable.

Default is false.

providerstringSpecifies your OpenAI provider. Set to openAi or azureOpenAi.
openAiSettingsobjectRepresents connection settings when provider=openAi.
   apiKeystringSpecifies your OpenAI token.
   organizationIdstring(Optional) Specify the Organization ID you want to use when accessing the OpenAI client. If left blank, the default organization ID for your account is used.
azureOpenAiSettingsobjectRepresents connection and resource settings when provider=azureOpenAi.
   apiKeystringSpecifies your Azure OpenAI token.
   resourceNamestringSpecifies the Azure resource that contains your deployed Azure OpenAI model.
   embeddingsDeploymentNamestringSpecifies the deployment name of your Azure OpenAI Embedding model.

Example AI Settings

Using OpenAI as the Provider

If you're using OpenAI is the provider, your openai.json file might look like this:

{
  "enabled": true,
  "provider": "openAi",
  "openAiSettings": {
    "apiKey": "abcdefg1234"
  }
}

Using Azure OpenAI as the Provider

If you're using Azure OpenAI is the provider, your openai.json file might look like this:

{
  "enabled": true,
  "provider": "azureOpenAi",
  "azureOpenAiSettings": {
    "apiKey": "abcdefg1234",      
    "resourceName": "azure_resource_name",
    "embeddingsDeploymentName": "embeddings_deployment_name"
  }
}


  • No labels