OpenAI

Spark is already your best way to codify your business logic and integrate it into your systems. It powers web portals and iPhone apps, cloud-scale modeling and simulation. Spark has solved the problems of translating business expertise into IT-consumable forms.

Generative AI, like ChatGPTarrow-up-right and Geminiarrow-up-right, is great at language tasks and reasoning. However, numerical tasks and calculations can be unreliable. By combining Generative AI with quantitative tools and models we can unlock much more business value. And nothing excels at deploying those tools quite like Spark.

While Spark can be integrated into any of the large language models being developed, OpenAI’s custom GPTsarrow-up-right provide an easy way to start to experiment and develop solutions in this space. The steps couldn’t be easier:

chevron-rightPrerequisiteshashtag
  • You have created a Spark service.

  • You have at least a ChatGPT Plus subscription. Please see Pricingarrow-up-right for more information.

Setup a ChatGPT integration

  1. Go to the Integration tab and copy the Code Snippets for OpenAI Action.

  2. In ChatGPT, click Explore GPTs and then go to My GPTs.

  3. Click on Create a GPT then click on Configure.

  4. Name your GPT and optionally add a description or custom instructions. Then click Create new action.

  5. Paste your code snippet from Spark into the Schema field.

  6. In the bottom right corner click the Format button. This will help to resolve discrepancies between ChatGPT's accepted schema versus the Code Snippet in YAML format.

  7. For authentication:

    1. If you are performing quick integration testing, you can use Authorization - Bearer token in Authentication.

    2. Alternatively, for more secure integrations, you can Secure the integration using OAuth2:

      1. Create the OAuth2 Authorization Code Grant described below in Secure the integration using OAuth2.

      2. In the Authentication section, click on the settings wheel and select OAuth2.

      3. Provide the values for the Client ID, Client Secret, authorization_endpoint, token_endpoint.

      4. In the Scope field, enter openid email profile offline_access and click Save.

    3. Click on the Test button, then click Sign In to authenticate with your tenant.

    4. After a successful login, you will be redirected back to ChatGPT.

  8. Click on your newly created GPT, go to Actions, and click the Test button.

  9. Chat with your bot! Iterate on the prompts, Spark service, or even add additional services until you adjust to the desired behavior. The conversation is powerful enough to manage multiple executions against the Spark service, for example in conducting a comparison between different options.

Secure the integration using OAuth2

  1. Complete the initial steps for Client Credentials grant (OAuth 2.0) Create client to create a separate client for ChatGPT. For this application, Ensure that Standard flow enabled is set to On.

  2. In the Login Settings page, add the following Redirect URIs and then click Save.

    1. https://chatgpt.com/*

    2. https://chat.openai.com/*

  3. Copy the Client ID.

  4. Click the Credentials tab and copy the Client Secret.

  5. In the left pane, click on Realm Settings, then scroll to the Endpoints section and click on Open ID Endpoint Configuration.

  6. Copy the values for authorization_endpoint and token_endpoint.

Last updated