Create BYOM connection – Open AI on Open AI

Picture of Rohit Kamble

Rohit Kamble

Updated on March 15, 2024

If you’re looking to enhance your language models by integrating Salesforce and OpenAI, you’re in the right place!

This guide will walk you through the process of setting up your own BYOM connection on OpenAI and configuring Salesforce to work seamlessly with GPTfy and OpenAI.

Prerequisites:

1. OpenAI account with access to OpenAI service.

2. OpenAI API key.

3. Salesforce instance with administrator access.

What to expect?

By the end of this guide, you’ll have a secure and efficient integration that allows you to leverage the power of OpenAI within your Salesforce environment for more informed and context-aware communication.

Step 2: Look for API Keys

Step 3: Make sure you have a secret key or generate one.

Salesforce Setup:

To configure a Salesforce org. to work seamlessly with GPTfy and OpenAI, follow these steps:

  • External Credential: Create an external credential to store your OpenAI key.
  • Add a Principal: Principals are created to manage and streamline the authentication process when Salesforce makes callouts to external systems.
  • Custom Header: Capture and integrate ‘Secret Key’ from OpenAI into Salesforce.
  • Permission Set: Develop a permission set for managing external calls to OpenAI on OpenAI.
  • External Credential Principal Access: Select the appropriate Available External Credential Principal and save.
  • Named Credentials: Define Named Credentials with the following:

    • URL: Copy the ‘Endpoint’ from OpenAI and paste it into Salesforce.
    • External Credential: Select the one you created in Step 1 of this section.
    • Allowed Namespace: ccai

Salesforce GPTfy Configurations

Create a new model connection from GPTfy to OpenAI On Azure

  • Go to the Cockpit in the GPTfy App and click on AI Models.
  • Below is an example of what it might look like. Select ‘Create your own’
  • Add connection info: Select values such as those in the examples in the screenshot below for the Model Name, Icon Details, Description, Icon Source, and Sequence. Hit save and refresh the page.
  • Connection Details: Open the model card created above and select values such as those in the examples in the screenshot below for the AI Technology, Platform, Version, Model, Temperature or Top P, Named Credential, Security Layer, Enable in Sandbox, Max Output Tokens, and EndPoint URL.

Note: The Named Credential and Endpoint URL are from Step 6 of Salesforce Setup (just above).

  • Click “Save” and refresh the page. Click “Activate”.

Congratulations on reaching the end of this guide!

This integration not only enhances the capabilities of your language models by incorporating external knowledge into text responses but also enables you to generate content that adapts in real-time to changing customer information and needs.