Admin BOTNOI GROUP
Feb 16, 2024
In recent years, many major companies including Open AI, Microsoft, Meta, Google and many others have advanced their artificial intelligence development by launching their AI chatbots. Recently, Google has gained a head start in the AI race by launching a new model called “Gemini”. With the ability to make decisions, give good answers and think carefully when answering more difficult and complex questions, it is an amazing AI that users can integrate into their own system.
What is Chat Gemini?
Gemini is a multi-model AI that is an evolution of a previous project from Google formerly known as Bard, a chatbot that was first unveiled on February 6, 2023. With this rebrand, the new Google chatbot promises a variety of features and functionalities that are much more accurate, nuanced and intuitive. It has the amazing ability to support normal text, code, audio, image and video data types.
Note: Make sure you only use the free version. Google can use this data to improve its AI, so don't share any sensitive data or company information.
How to connect Gemini to the chatbot?
For us casual users, the most interesting part of Gemini is the possibility of integrating Google Gemini into our mobile app that can significantly enhance app functionality and user interaction. For example, what happens if we connect Gemini with LINE, an instant messaging app that we’re all familiar with? What new features can you explore?
Below you can see an example of connecting LINE Chatbot to Gemini. It takes less than 10 minutes and only four steps if done through BOTNOI's chatbot system.
Step 1: Create an API key
First, let’s head Google AI Studio if you have never signed up for an account here before. A page with the terms of use will appear, which you can accept. Note that you have to agree on the first section to gain access. Agree to the terms of use as requested. A box will also appear where you can voluntarily sign up to receive news, updates and invitations.
Steps to get the API key from Google AI Studio:
Select the "Get API key" menu.
Press "Create API key".
In case you have never created one before, select "Create API key in new project".
Wait for a hot second and you will get API keys to use!
Step 2: Create LINE OA account and connect to Botnoi.ai
Create LINE OA
Those who already have a LINE OA (official account) connected to some bots can skip this step. However, those who are yet with a LINE account can watch this video showing how to create a LINE OA.
Account connection to Botnoi.ai
Now we will connect our LINE OA account to BOTNOI platform. The connection method can be found in "How to create a bot and connect it to LINE". Please go ahead and refer to it.
Step 3: Connect Gemini via Botnoi.ai
Select API menu.
Press Add.
Name API and select the post method.
Enter the URL in the field: https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=
followed by the API key copied in step 1.
Add headers and body. In the header field, enter Content-Type and in the Value field, enter application/json. Copy the code and paste it in the body section.
Then press Save.
Step 4: Calling Gemini API
Click Train Bot.
Select Default Fallback.
Press BOT RESPONSE.
Select the existing object response and then API_gemini that we named in step 3.
Add another response in text format and enter it like this: <<API_gemini.candidates.0.content.parts.0.text>>. If you have a different API name, please use your own API name to replace it.
When you’re done, press save.
That's it, now you have a super chatbot at your fingertips, powered by Google's access to world-class resources! Those who want to get more details on this topic can read what Dr. Winn Voravuthikunchai, CEO of Botnoi Group, wrote in the Medium article explaining how to create a super-intelligent LINE chatbot for free and without code using AI LLM GEMINI. It's so easy, even those without programming experience can do it!
If you are interested, you can contact the following social media accounts for more information
FB Group: Meta Community
Article explaining how to create a chatbot: How to create dynamic Flex messages that pull data from Google Sheet and display it via Botnoi.ai [with code]
กลับ