🧩Fun fun functions!

So you’ve got your Gooey.AI workflow up and running, everything is working fine and you're happy with the outputs. But is it REALLY ready? You must also connect your AI workflow to your data, servers, and other APIs. With our new Functions feature, you can do just that.

What are Gooey.AI Functions?

Gooey.AI Functions are simply sandboxed Javascript functions & API calls inside your Gooey.AI recipes.

LLMs can be non-deterministic and often we must have some functions to ensure that the user receives the right information or that user response triggers something important in your tech stack.

Why functions in Gooey.AI Matter

Functions came up as a feature request from the community. With minimal setup for the development team, the Functions workflow can:

  1. Call your APIs Use your APIs for BEFORE and AFTER Requests, this will allow you quick iterations and flexibility to pull or push data to your servers and tech stacks. See the example below 👇

  2. Call the APIs of others Add API functions from any other projects and processes that support your product

  3. Perform logic in javascript Use simple JS logic and operators for your workflow.

  4. Chain Gooey.AI workflows together Now you can easily chain Gooey.AI Workflows

Who's using it?

Opportunity Bot

Scenario

Opportunity must always send out a disclaimer to all new users about their data policy. They want to ensure the message is only sent out to new users. In this scenario, we can use a BEFORE Function to call their API with the “Custom Message”. If the user is new they will receive the “Custom Message” + Assistant, if they are old, or have a longer conversation with the Copilot, they do not receive the “Custom Message”

How does it work?

At the core, Gooey.AI Functions just adds the power of JS to any of your AI Workflows. You create small JS snippets, that can be mixed and matched with any Gooey workflow. This means you can:

  • use all the best parts of our abstraction layers

  • customize and chain GenAI tools to your existing systems

  • deploy code snippets directly with Gooey (no setup, no servers needed!)

Functions can be executed before (BEFORE) your run or after it’s completed (AFTER). This could include logs, data, and API calls.

How can I use Gooey.AI functions?

In this scenario, imagine you have an AI copilot on Gooey.AI, the copilot has an Analysis script in the Copilot integrations that uses GPT-4 to output:

  1. Category of user’s query

  2. Whether the assistant could find responses in the vectorDB and answer the user.

We will use Functions to create a POST request and send the GPT-4 output to a support CRM like Hubspot.

What's coming?

  1. Secret management - This will allow you to include Secrets API keys and tokens in your Function calls.

  2. LLM-enabled functions - This will allow your AI prompts to call a Function as a tool in the LLM pipeline.

How do I get started?

Check out the links below:

Last updated