MARKETPLACE
PLUGINS
GOOGLE AI - GEMINI CHAT STREAMING
Google AI - Gemini Chat Streaming logo

Google AI - Gemini Chat Streaming

Published February 2024
   •    Updated this week

Plugin details

Leverage the power of Google Gemini models, including Gemini Pro and Gemini Pro Vision, on your app through this plugin enabling ChatGPT-Like multi-turn conversations with streaming capabilities, along with function calling.
These AI engines, particularly the Pro version, are designed for seamless multi-threaded and multimodal interactions, effortlessly managing simultaneous conversations.
Built on advanced machine learning and vast datasets, they excel in interpreting nuances of language and context with remarkable precision.

With the introduction of the Gemini models, we're stepping into a new era of AI-driven communication, blurring the lines between human and machine interactions.

This plugin supports Google Search on supported models,  threads management, native app data retrieval with privacy rules (RAG) and function/tools calling to feed data from your application or external services to the AI engine.

This plugin uses an external service to provide streaming and parameters hiding capabilities.

Demo Link: https://googlegeminichatdemo.bubbleapps.io/version-test

Editor Link: https://bubble.io/page?type=page&name=index&id=googlegeminichatdemo&tab=tabs-1

💡 𝗦𝘂𝗯𝘀𝗰𝗿𝗶𝗽𝘁𝗶𝗼𝗻𝘀 𝗮𝗿𝗲 𝗽𝗿𝗼𝗿𝗮𝘁𝗲𝗱. 𝗜𝗳 𝘆𝗼𝘂 𝗶𝗻𝘀𝘁𝗮𝗹𝗹 𝗮𝗻𝗱 𝘂𝗻𝘀𝘂𝗯𝘀𝗰𝗿𝗶𝗯𝗲 𝘁𝗵𝗶𝘀 𝗽𝗹𝘂𝗴𝗶𝗻 𝗶𝗻 𝗼𝗻𝗲 𝗱𝗮𝘆 𝘁𝗼 𝘁𝗲𝘀𝘁 𝗶𝘁 𝗼𝘂𝘁, 𝘆𝗼𝘂'𝗹𝗹 𝗼𝗻𝗹𝘆 𝗯𝗲 𝗰𝗵𝗮𝗿𝗴𝗲𝗱 𝟭/𝟯𝟬𝘁𝗵 𝗼𝗳 𝘁𝗵𝗲 𝗺𝗼𝗻𝘁𝗵𝗹𝘆 𝘀𝘂𝗯𝘀𝗰𝗿𝗶𝗽𝘁𝗶𝗼𝗻 𝗳𝗲𝗲.

📖 𝗦𝘁𝗲𝗽-𝗯𝘆-𝗦𝘁𝗲𝗽 𝗶𝗻𝘀𝘁𝗿𝘂𝗰𝘁𝗶𝗼𝗻𝘀 𝗮𝗿𝗲 𝘁𝗵𝗲 "𝗜𝗻𝘀𝘁𝗿𝘂𝗰𝘁𝗶𝗼𝗻𝘀" 𝘀𝗲𝗰𝘁𝗶𝗼𝗻 𝗮𝗻𝗱 𝗗𝗲𝗺𝗼 𝗘𝗱𝗶𝘁𝗼𝗿 𝗶𝘀 𝗶𝗻 𝘁𝗵𝗲 "𝗟𝗶𝗻𝗸𝘀" 𝘀𝗲𝗰𝘁𝗶𝗼𝗻 𝗼𝗳 𝘁𝗵𝗲 𝗣𝗹𝘂𝗴𝗶𝗻 𝗣𝗮𝗴𝗲.

Contact us at [email protected] for any additional feature you would require or support question.

$99

One time  •  Or  $9/mo

stars   •   0 ratings
30 installs  
This plugin does not collect or track your personal data.

Platform

Web & Native mobile

Contributor details

wise:able logo
wise:able
Joined 2020   •   122 Plugins
View contributor profile

Instructions

GOOGLE AI - GEMINI CHAT STREAMING ====================================

ELEMENT DESCRIPTION
----------------------------------
 GOOGLE AI - GEMINI CHAT STREAMING provides ChatGPT- like multi-turn streaming conversations.

STEP-BY-STEP SETUP
--------------------------------
 0) Register on Google Maker Suite to get your API Key https://makersuite.google.com/app/apikey

 1) Implement ERROR workflow as per the demo so any errors are caught to your app.

 2) Register on plugins.wiseable.io. Create a new Credential which associates your BUBBLE APP URL,  GOOGLE GEMINI API KEY.
  The registration service will generate your PUBLIC ACCESS KEY. This key serves as a secure proxy for your real API key. It allows your application to communicate with the service without exposing your real API key. Since this PUBLIC ACCESS KEY is explicitly tied to your registered BUBBLE APP URL, it can only be used from that domain, ensuring that even if the key is publicly visible, it remains safe and cannot be misused by unauthorized sources.

 3) In the Plugin Settings, enter your PUBLIC ACCESS KEY generated at the previous step.

 4) Add the GOOGLE AI - GEMINI CHAT STREAMING to the page on which the chat must be integrated

 5) Add an element supporting input text for the use prompt

 6) Integrate the logic into your application using the following GOOGLE AI - GEMINI CHAT STREAMING element's states and actions:

 FIELDS:
  - RESULT DATA TYPE : Must always be selected as Threads (Gemini AI).        
  - MODEL : The model name. See https://ai.google.dev/models/gemini. You may hide this data from eavesdroppers by using GET DATA FROM AN EXTERNAL API > GEMINI AI - ENCRYPT and set this field as result of this API.
  - API VERSION : The API version to use for this operation. See https://ai.google.dev/docs/api_versions. You may hide this data from eavesdroppers by using GET DATA FROM AN EXTERNAL API > GEMINI AI - ENCRYPT and set this field as result of this API.
  - ROLE INFORMATION : Define the role of the AI assistant. You may hide this data from eavesdroppers by using GET DATA FROM AN EXTERNAL API > GEMINI AI - ENCRYPT and set this field as result of this API.
  - APP DATA RETRIEVAL : Set to yes to activate data retrieval from your app when needed to answer to the user prompt. Your app DATA API must be enabled.
  - MAX TOKENS :  The maximum number of tokens to generate in the completion. The token count of your prompt plus MAX TOKENS can't exceed the model's context length. Most models have a context length of 2048 tokens (except for the newest models, which support 4096).
  MULTIMODAL OUTPUT SETTINGS
  - IMAGE :  Enable image generation for supported models. See https://ai.google.dev/gemini-api/docs/models#model-variations
 DATA RETRIEVAL SETTINGS
    - APP DATA RETRIEVAL : Set to yes to activate data retrieval from your app when needed to answer to the user prompt. Your app DATA API must be enabled. See https://ai.google.dev/gemini-api/docs/models#model-variations
    - GOOGLE SEARCH : Set to yes to activate Google Search when needed to answer to the user prompt on supported models. See https://ai.google.dev/gemini-api/docs/models#model-variations


 EVENTS :
 - ERROR : Event triggered when an error occurs.
 - STREAMING STARTED : Event triggered when the streaming starts.
 - STREAMING ENDED : Event triggered when the streaming ends.
 - CALL FUNCTION : Event triggered when a function triggers, as define in FUNCTIONS of SEND PROMPT action.
 - THREADS TO SAVE: Event triggered when any of the thread has changed.
 - READY: Event triggered when this element's fields have been set and element is ready to serve requests.

 EXPOSED STATES:
 Use any element able to show/process the data of interest (such as a Group with a Text field) stored within the result of the following states of the GOOGLE AI - GEMINI CHAT STREAMING :
 - ERROR : Error message upon Error event trigger.
 - IS STREAMING : Returns true when streaming is in progress.
 - ALL THREADS : List of threads containing a list of role and message content.
 - ALL THREADS (RAW DATA) : String containing All Current Threads in JSON format. You may use this string to load threads in "Load Threads" action.
 - FUNCTION NAME : String containing All Current Threads in JSON format. You may use this string to load threads in "Load Threads" action.
 - FUNCTION ARGUMENTS : Arguments of the function, set upon CALL FUNCTION event.
 - FUNCTION THREAD ID : Unique identifier of the thread of the function call, set upon CALL FUNCTION event.
 - LATEST STOP REASON : Latest stop reason of the AI engine, populated upon STREAMING ENDED event.
 - LATEST INPUT TOKEN USAGE : Latest input token usage of the AI engine, populated upon STREAMING ENDED event.
 - LATEST OUTPUT TOKEN USAGE : Latest output token usage of the AI engine, populated upon STREAMING ENDED event.


 ELEMENT ACTIONS - TRIGGERED IN WORKFLOW:
   - SEND PROMPT : Send Prompt.
     Inputs Fields :
       - PROMPT : The text instructions or chat dialogue to include in the prompt.
       - FILES : List of Files to add to the prompt.. Supported only for models supporting text and image inputs.
       - TEMPERATURE :  The temperature is used for sampling during the response generation, which occurs when topP and topK are applied. Temperature controls the degree of randomness in token selection. Lower temperatures are good for prompts that require a more deterministic and less open-ended or creative response, while higher temperatures can lead to more diverse or creative results. A temperature of 0 is deterministic: the highest probability response is always selected. Range: 0.0 - 1.0
   - SET THREAD TITLE : Set a custom Thread Title of a given Thread ID.
  Inputs Fields :
       - THREAD ID : Set the title to this Thread ID. A valid Thread ID is one of the exposed state ALL THREADS.
       - TiTTLE : New title
   - DELETE THREAD ID : Delete the specified Thread ID.
  Inputs Fields :
       - THREAD ID : Delete the specified Thread ID.  
   - LOAD THREADS : Load the threads.
  Inputs Fields :
       - THREADS (RAW DATA) : String formatted as JSON-safe, containing the threads in JSON format    
   - SEND FUNCTION RESULT : Send the function results. See https://cookbook.openai.com/examples/how_to_call_functions_with_chat_models#basic-concepts
  Inputs Fields :
       - THREAD ID : Send the function result to this Thread ID. A valid Thread ID is one of the exposed state ALL THREADS. Autogenerated if not set.
       - FUNCTION NAME : Name of the result function to pass.
       - FUNCTION RESULT : Result of the function to pass. Must be JSON-formatted.

7) (Optional) Add the GOOGLE AI - MARKDOWN & LATEX PARSER element to display markdown formatting


IMPLEMENTATION EXAMPLE
======================
Feel free to browse the app editor in the Service URL for an implementation example.

TROUBLESHOOTING
================
Any plugin related error will be posted to the the Logs tab, "Server logs" section of your App Editor.
 Make sure that "Plugin server side output" and "Plugin server side output" is selected in "Show Advanced".

> Server Logs Details: https://manual.bubble.io/core-resources/bubbles-interface/logs-tab#server-logs

PERFORMANCE CONSIDERATIONS
===========================
 N/A

QUESTIONS ?
===========
Contact us at [email protected] for any additional feature you would require or support question.

Types

This plugin can be found under the following types:
Api   •   Background Services   •   Element   •   Event   •   Action

Categories

This plugin can be found under the following categories:
AI   •   Media   •   Productivity   •   Chat   •   Customer Support   •   Input Forms   •   Visual Elements

Resources

Support contact
Documentation
Tutorial

Rating and reviews

No reviews yet

This plugin has not received any reviews.
Bubble