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 ChatGPT and Gemini, 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 GPTs provide an easy way to start to experiment and develop solutions in this space. The steps couldn’t be easier:
Prerequisites
You have created a Spark service.
You have at least a ChatGPT Plus subscription. Please see Pricing for more information.
Setup a ChatGPT integration
Go to the Integration tab and copy the Code Snippets for OpenAI Action.
In ChatGPT, click Explore GPTs and then go to My GPTs.
Click on Create a GPT then click on Configure.
Name your GPT and optionally add a description or custom instructions. Then click Create new action.
Paste your code snippet from Spark into the Schema field.
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.
For authentication:
If you are performing quick integration testing, you can use Authorization - Bearer token in Authentication.
Alternatively, for more secure integrations, you can Secure the integration using OAuth2:
Create the OAuth2 Authorization Code Grant described below in Secure the integration using OAuth2.
In the Authentication section, click on the settings wheel and select OAuth2.
Provide the values for the Client ID, Client Secret,
authorization_endpoint,token_endpoint.In the Scope field, enter
openid email profile offline_accessand click Save.
Click on the Test button, then click Sign In to authenticate with your tenant.
After a successful login, you will be redirected back to ChatGPT.
Click on your newly created GPT, go to Actions, and click the Test button.
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
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.Follow the steps to:
In the Login Settings page, add the following Redirect URIs and then click Save.
https://chatgpt.com/*https://chat.openai.com/*
Copy the Client ID.
Click the Credentials tab and copy the Client Secret.
In the left pane, click on Realm Settings, then scroll to the Endpoints section and click on Open ID Endpoint Configuration.
Copy the values for
authorization_endpointandtoken_endpoint.
Last updated
