AI Settings


Overview

CAST Imaging integrates with AI technology to provide an automated AI driven explanation of objects materialized during an application analysis. You can find out more details about using AI services in Leverage AI services.

CAST supports the following AI providers:

This feature is available only when the required provider is configured and when the relevant feature is enabled - see below:

Configuring a provider

Ensure you have generated the required configuration data from your chosen provider see below, choose the provider in the drop down and enter the key, then click Update:

The following is required:

Provider Required
OpenAI
  • API key
  • Access to api.openai.com (port 443).
Azure OpenAI
  • API Key
  • Endpoint URL: usually this will take the form https://<app_name>.openai.azure.com.
  • Deployment Name: usually this will take the form <app_name>.
CAST recommends using the gpt-35-turbo or gpt-4 models.
Ollama AI
  • Endpoint URL: usually this will take the form http://<local_server>:11434.
  • Model Name: use the following URL to determine your chosen model name: http://local_server:11434/api/tags - the minimum model required is llama3.3:70b-instruct-q8_0.
Vertex AI
  • Model Name: this will take the form <model_name> - CAST highly recommends the Gemini-1.5 Pro model.
  • Location: usually this will be set to us-central1 but this may depend on your Google deployment location.
  • Service Account Details: this is your IAM/Admin service account key exported to .json format.

Enabling AI features

When a valid API key or configuration data is defined, the various AI feature toggles will become available. Use the check boxes to enable the features you require:

Option Description
Explain code with AI Enables right click contextual menu options when consulting results and working at Object level - with options providing explanations directly in the source code:

Assistant chatbot Enables the Ask me anything feature within the Imaging Assistant located in the lower right corner when consulting results (note that the Summarize with AI option will remain disabled - it is enabled via the AI Summary option explained below):

AI Summary Enables two features that can generate an AI driven explanation of items in your application, displayed in a Post-It:

  • Summarize with AI: generates an AI-driven explanation of items in the Transaction, Data Call Graph and Module scopes, saving to a Post-It available via a tab in the Imaging Assistant:



  • Transaction Summary: generates an AI driven explanation of a given transaction, available via the Customize my results option. See also Using the Transaction Summary feature.

Ensure your source code is accessible

The AI-driven features are all based on the source code of objects in your application, therefore, CAST Imaging must be able to display source code.

  • For applications that have been fully analyzed with CAST Imaging, source code will be available by default in the right panel. You do not need to do anything else.

  • For applications whose results have been imported into CAST Imaging (i.e. the application has not been fully analyzed), you will need to ensure that a datasource is configured. See Managing data source configuration

Obtaining an API key

OpenAI

  • Browse to your profile using the user menu in the top right:

  • Click the User API keys tab and then select View project API keys:

  • Finally click Create new secret key:

Azure OpenAI

The following is required to obtain an Azure OpenAI API key:

  • An Azure subscription - Create one for freeexternal link.
  • Access granted to Azure OpenAI in the desired Azure subscription. - Currently, access to this service is granted only by application. You can apply for access to Azure OpenAI by completing the form at https://aka.ms/oai/accessexternal link.
  • An Azure OpenAI Service resource with either the gpt-35-turbo or the gpt-4 models deployed. For more information about model deployment, see the resource deployment guide.

See https://azure.microsoft.com/en-gb/products/ai-services/openai-service/external link for more information.