From 0c7d2afd5164f6e3d7955fb3bd91c1f9f25b3f18 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Thu, 22 Aug 2024 18:15:44 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20Generate=20variables=20doc?= =?UTF-8?q?s=20section?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/docs/editor/blocks/integrations/openai.mdx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/docs/editor/blocks/integrations/openai.mdx b/apps/docs/editor/blocks/integrations/openai.mdx index 7f2e9e25c..01fa9f17c 100644 --- a/apps/docs/editor/blocks/integrations/openai.mdx +++ b/apps/docs/editor/blocks/integrations/openai.mdx @@ -78,6 +78,20 @@ The generated audio URLs are temporary and expire after 7 days. If you need to s This action allows you to transcribe a audio URL into text. +## Generate variables + +This action allows you to set variables based on a prompt. + +Let's you want to want to extract a specific bit of information based on user's last message. You could use this block action to extract for example his name. To do that you could add the following prompt: + +```txt +Extract user's information from user's last message: "{{Last message}}" +``` + +This you could provide for example the following variables: `Name`, `Email` + +If the `Last Message` variable is set to "My name is John and my email is john@gmail.com", then the `Name` and `Email` variables will be set to `John` and `john@gmail.com` respectively. + ## Using Multiple Open AI Blocks: Tips and Tricks In this video, I discuss some important things to keep in mind when using multiple Open AI blocks consecutively. I provide an example where we ask the user for a topic, generate a summary, and display a list of authors.