Unlock AI Power: Intro to Auto-Completion

Unlock AI Power: Intro to Auto-Completion Hi and welcome to this video. After learning how to set up the connection to open AI, we will jump right into creating our first AI-driven workflow. For this purpose, we are introducing Julia, the marketing lead in a small startup. Along the course, you will see her exploring the opportunity to use AI for many of her daily tasks. But before that, let's build our very first AI-driven scenario. You should walk away from this.

Unlock AI Power: Intro to Auto-Completion

Tutorial knowing how to integrate AI modules with other apps at Make. Let's get to it. So we'll be creating a scenario using Google Sheets to connect to this list of countries. After that, we'll be passing each country to an open AI module where we'll be prompting it to find the capital city of that country. Lastly, we'll update the column B in our Google Sheet file with the capital we obtained from the previous module. So let's get into it..

Let's first look for the Google Sheets module. We can see that it's already available straight away in our list of applications. Now, the kind of action that I'm looking for is get range values. This is because we want to access all values in column A and B of our list. So I'll just add my connection, and I can see that the connection was successful. Then I need to connect my spreadsheet with countries, so I'll choose select from the list because.

That way I won't have to type manually all of the details like spreadsheet ID etc. Make sure to choose the appropriate Drive. In my case, the Google Sheet has been shared with me by my colleague, so I'll choose the shared with me option. Now, I need to connect spreadsheet ID, and I can see that thanks to the select from the list option that I chose previously, I have all of my shared Google Sheets popping up. I'll choose countries,.

Which is the one that interests me, and since I only have one sheet in that file, I have just one value to select in this field. Now, about a correct range, you can always see the correct range in this field of your Google Sheet, so I'll just select all of the values. And I can see that this is the range that I need. I'll copy, paste, and move to the field asking me if my table contains headers. Coming back to my sheet, I can see that it does contain headers, and.

This is again the right range for those headers, so I'll say yes and copy-paste in that value. Now let's test our module. We are getting results, and it seems there are no problems. The scenario returned Afghanistan, Albania, Algeria, etc., which coming back to our Google Sheet sounds about right. So it seems that we are getting the right results. Let's now add a second module, which is the open AI module. I choose create a completion. If you're wondering why and how to set that up,.

I invite you to head back to our previous video, which is dedicated to setting up a connection with Open AI. I can see that I already have my connection ready, so I'll just proceed to select a method. In this case, I will go with prompt completion. Choose my model and go right into the prompt. For this, I have pre-prepared a prompt, so let me copy-paste it here. I say I have a country. In our previous module, we got each country from the list, so what I.

Need to do now is to map the country that I receive, which I can find here in the column A. So I'll just click on that value, and I can see that it's automatically mapped in my prompt window. In case you are a bit lost on what mapping means, I invite you to head back to our Make Academy, which covers mapping in detail. In a nutshell, mapping lets you use values from the previous modules. So I am basically saying for every country, I want you to tell me the name of.

Its capital. Don't tell me anything else, return just a single word like this: Prague. We use this because Chat GPT often has the tendency to just return a couple of different words, and we just really want the one word for the capital. I then put my max tokens, and that's it. Let's now try to run the module. It's asking us to specify a country, so let's take, for example, Armenia. I copy-paste Armenia, and we can see that we are getting a result, which means that.

It's connected well. We are getting Yerevan as a response, which is the capital of Armenia. But when you look back at our sheet, it's still not updating, which is why we need to connect a third module. Let's add Google Sheets module, and let's look for the update row. So in update row, we basically take the row of the country that we were looking for and the capital that we just got back from our Open AI. So choose a method, select by path, again shared with me,.

And let's look for our spreadsheet. Select the right one and let's move on. For the row number, we want to go back to our first module and we want to map the value here. This is because we want to make sure that we are updating the same row as we got in the first module. We already know it contains the header and here we can see that we have a list of values. Basically, this corresponds to the columns in our Google Sheet. In the empty field,.

We can insert the values that we want to update in our list. So we don't want to insert anything for country because we already have all filled in. Instead, we want to insert values for capital B because we want to insert the capital there. So what do we want to insert? Well, we want to insert the response that we received from Open AI and we want to return Yerevan, and that looks like it. Let's try to run. I'll save my scenario first, and now I proceed to running the workflow. We.

Posts Related:

Previous Post Next Post