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.
{ "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.
Attribute | Value | Description | |
---|---|---|---|
enabled | boolean | Enables or disables OpenAI settings. Set to Default is | |
provider | string | Specifies your OpenAI provider. Set to openAi or azureOpenAi . | |
openAiSettings | object | Represents connection settings when provider=openAi . | |
apiKey | string | Specifies your OpenAI token. | |
organizationId | string | (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. | |
azureOpenAiSettings | object | Represents connection and resource settings when provider=azureOpenAi . | |
apiKey | string | Specifies your Azure OpenAI token. | |
resourceName | string | Specifies the Azure resource that contains your deployed Azure OpenAI model. | |
embeddingsDeploymentName | string | Specifies 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" } }