I’d like to share a new demo inspired by the Museum of Flight in Seattle, USA and by a recently released OpenAI-GPT IA that makes it possible for Intuiface to engage the powerful GPT-3 AI model by OpenAI.
The demo consists of three main components: a user interface (UI), an Excel file that combines user preferences into a meaningful GPT-3 prompt, and a custom IA that communicates with the OpenAI API to retrieve the answer.
The UI allows users to select a topic and language, and to choose the complexity level of the answer using a slider that ranges from 0 to 10. The slider also features a converter that adjusts the length of the answer based on its complexity level.
Once the user’s preferences are collected, they are stored in an Excel file, which forms the basis of the GPT-3 prompt. To ensure that the AI model produces answers that match our requirements, we pass certain parameters to it in a structured format. Here is what the full prompt looks like:
Please explain a topic following a specific prompt format that uses brackets to separate various parameters. Here is the format:
[Topic], [Language], [0-10], [Max Words]
Let me explain each parameter:
[Topic] is the subject that I need you to explain.
[Language] is the language that the explanation should be translated to.
[0-10] is the desired level of complexity of the explanation. The complexity level is indicated on a scale of 0 to 10, where 0 corresponds to a very simple explanation suitable for elementary school students, 5 corresponds to an explanation suitable for middle-school students, and 10 corresponds to a college-level explanation.
[Max Words] is the maximum number of words allowed for your explanation. Please don’t exceed it.
The OpenAI-GPT IA is a custom API developed by @seb for the Intuiface community. It enables users to access specific AI models from OpenAI, submit custom prompts, and set a limit on the number of tokens (or words) in the response.
By limiting the amount of data transferred in each query, users can control the cost of the service while still benefiting from the power of OpenAI’s AI models.
Feel free to download and test this XP.
Please note that to use this XP and customize it, you will need to sign up for the OpenAI API platform and obtain your own secret API key. Once you have your API key, simply switch to Edit mode in Composer, locate the Excel database file called XLS_PromptMaker under Interface Assets, and paste your API key into the appropriate field. Enjoy!