Blog

Software tips, techniques, and news.

Using ChatGPT with FileMaker

If you keep track of the latest trends in technology or are obsessed with the Terminator franchise, then you've probably asked yourself, "Where will AI be in the next five years?" We've seen Artificial Intelligence used to generate artwork, improve patient treatment, detect insurance fraud, and much, much more. The latest entry into this trove of excitement is OpenAI's ChatGPT. Released in November 2022, ChatGPT (Generative Pre-trained Transformer 3) is a language model designed to produce conversation-style results for its users. Because of its conversational nature, a ChatGPT integration with your FileMaker solution has the potential to increase your automation and efficiency without sacrificing the human-like feel. 

ChatGPT can be accessed for free by visiting chat.openai.com/chat. You may need to create an OpenAI account, and during high volume times, there may be some wait time before being permitted to use the site. The layout is a simple interface akin to a large text message. The AI is activated by typing and sending a message, after which the user can halt a response in progress or regenerate a completed response. 

youtube-preview

Use Cases

The AI can handle a range of prompts from simple questions like "What is an elephant's lifespan?" to even more subjective things such as "What is Klayton Kershaw's best pitch?" You can even challenge it to a game of tic-tac-toe!

chatgpt tictactoe.

Of course, for developers, a more exciting feature may be its ability to generate code or think through data models. We asked chatGPT to create a FileMaker script that will loop through a portal. Check out the results:

filemaker chatgpt create script prompt.

We also asked it for help by seeking alternatives to using an unstored calc in a FileMaker relationship:

alternatives to unstore calculation filemaker chatgpt.

Integrations

The official ChatGPT API is available for $0.002 for every 1,000 tokens. In this demo, we'll utilize OpenAI's free GPT3 API in conjunction with Postman to generate directions on how to bake a cake. There are three parameters that help determine the AI's response:

  1. Model/Engine- Choose between Davinci, Ada, Curie, or Babbage. Each have their own capabilities and speed of parsing text.

  2. Tokens- Required to produce text. For example, if your response requires 600 tokens, you must use 600 tokens to see the entire response. If your max is set to 300, you will only see part of the response.

  3. Temperature- Determines the overall creativity and detail of the response on a scale from 0 to 1.0.

Below are two responses in Postman from the exact same prompt ("How do I bake a cake?") and model (Davinci), but the temperature has been increased from 0.2 to 0.9. You'll notice the second image has more detailed steps in the instructions. 

1. Temperature = 0.2

filemaker chatgpt postman response.

2. Temperature = 0.9

filemaker chatgpt postman response 2.

Now, let's see this same thing in action in our FileMaker demo. First, you'll need to set up a JSON that contains your model, user prompt, temperature, and the max number of tokens you'd like to use. 

filemaker chatgpt json.

Then, you'll create your cURL options and attach the previously created JSON using the line "-d @<yourJSONName>."

filemaker chatgpt json curl options.

Lastly, make a call to "https://api.openai.com/v1/completions" using the 'Insert from URL' Script step.

filemaker chatgpt api call insert from url.

Using the interface on the demo file is even easier. When you open the file, simply enter your number of max tokens (we've chosen 400) and temperature, type in whatever prompt you'd like, and then hit the send button. Here, we've added the AI's response to "How do I bake a cake?" using a temperature of 0.5.

filemaker chatgpt integration demo file example.

Again, we've used the same prompt, but with a higher temperature to showcase the difference in detail.

filemaker chatgpt integration demo file example 1.0 temperature.

Conclusion

Where will AI be in five years? No one really knows, but the emergence of technology like ChatGPT could mean reliable alternatives to search engines, wikis, and code templates. To discuss integrating your FileMaker application with ChatGPT, please contact DB Services for more information.

Did you know we are an authorized reseller for Claris FileMaker Licensing?
Contact us to discuss upgrading your Claris FileMaker software.

Download the Filemaker ChatGPT Integration File

Please complete the form below to download your FREE FileMaker file.

First Name *
Last Name *
Company
Email *
Phone *
FileMaker Experience *
Agree to Terms *
cletis jones headshot.
Cletis Jones

Cletis is a personable and supportive developer who is dedicated to helping others reach a common goal, keeping an open mind to all possible solutions. Committed to collaboration and teamwork, he enjoys helping clients and coworkers alike.