Configuration

This Configuration tab helps you manage your application settings:

Configure AI features

Enables an administrator to configure general AI features as well as service settings and parameters for a specific AI vendor.

Click Configuration and expand the dropdown.

Expanding the dropdown causes the fields to be displayed.

The first time you click Configuration and expand the dropdown, one of the following applies:

If config.php already contains AI configuration

  • The existing values for AI configuration in the SWARM_ROOT/data/config.php file are automatically copied into the form on the Configuration tab. For example, if AI was already enabled, it remains enabled.

  • We recommend that you remove the AI configuration block from the config.php file because this block is no longer used.

If no AI configuration already exists

  • The default values for AI configuration are automatically copied into the form on the Configuration tab. For example, by default, AI is disabled.

  • You can choose to enable AI functionality, which, by default, is disabled.

  • In either case, a new key is created in the P4 Server store of P4 Code Review metadata.

Configure general AI features

The AI configuration section allows you to enable or disable AI, set how long AI-generated data is retained, and set the maximum time to wait for the AI response.

  • To set how long AI-generated data is retained, enter a value and select a unit.

  • To set the Request Timeout in milliseconds, enter an integer.

  • To ensure that your most recent changes take effect, click the Save configuration button.

  • To restore the most recently saved configuration, click the Reset to original button.

To learn more, see .

Configure a specific AI service

P4 Code Review is compatable with the following AI Vendors

To edit an AI vendor configuration, click the Edit vendor configuration icon.

You can specify:

  • The name of an AI vendor.

  • (Optional) The value of the AI package.

  • The name of the AI model.

  • The type of the AI package, including a custom type.

  • The API key.

  • The minimum character limit for AI processing.

  • The maximum character limit for AI processing.

  • The API endpoint URL for the service.

You can specify a prompt:

  • To improve a comment.

  • To summarize text.

  • To fix spelling and grammar.

  • That is a custom prompt for AI processing.

To save your updates to the AI vendor configuration, click Update AI Vendor.

Configure Slack

Enables an administrator to configure Slack workspaces, notification routing, user mentions, message formatting, and bot settings.

Click Configuration and open the Slack tab.

The Slack tab allows you to configure:

  • Workspace connection and authentication.

  • Project-to-channel mappings.

  • Notification settings.

  • @mention behavior.

  • Message content and formatting.

  • Bot identity settings.

Slack configuration is stored in P4 Code Review metadata and managed on a per-workspace basis.

Configuration saved in the Slack tab overrides Slack values configured in config.php.

To configure a Slack workspace:

  1. Open the user menu (top-right corner of P4 Code Review) and select System Information.

  2. Click Configuration.

  3. Open the Slack tab.

  4. Add or edit a Slack workspace.

  5. Configure the required settings for the workspace.

  6. Save your changes.

For detailed Slack configuration information, see Configure Slack.