MARKETPLACE
PLUGINS
XAI GROK CHAT STREAMING WITH RAG
xAI Grok Chat Streaming with RAG logo

xAI Grok Chat Streaming with RAG

Published January 2025
   •    Updated this month

Plugin details

Grok AI is an innovative chatbot designed with advanced AI technology to enable natural and engaging conversations with users.
It boasts a wide range of features, such as:

- Content Summarization and Language Translation: Grok helps you quickly understand website content and break language barriers by translating text effortlessly.
- Creative Content Generation: Whether you need stories, poems, code, scripts, or music, Grok's creative capabilities allow it to produce a variety of text formats.
- Research and Real-Time Answers: By accessing real-world data through the 𝕏 platform, Grok delivers accurate, up-to-date information and isn't afraid to explore bold or unconventional topics.
- Multitasking Abilities: Grok can efficiently manage multiple queries and tasks at once, making it easy to switch between different activities seamlessly.
Advanced Web Search Capabilities: Tap into the now with real-time search, pulling fresh, relevant data from the web and 𝕏 instantly.

DeepSearch is designed to synthesize key information, reason about conflicting facts and opinions, and distill clarity from complexity. Whether you need to access the latest real-time news, seek advice about your social woes, or conduct in-depth scientific research, DeepSearch will take you far beyond a browser search.This combination of versatility and intelligence makes Grok a powerful companion for both productivity and creativity.

This plugin supports  threads management, web search, 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.

Demo Link: https://grokstreaming.bubbleapps.io/version-test?

Editor Link: https://bubble.io/page?name=index&id=grokstreaming&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
12 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

xAI GROK - CHAT STREAMING WITH RAG ====================================

xAI GROK - CHAT STREAMING WITH RAG - ELEMENT DESCRIPTION
------------------------------------------------------------------------------
 xAI GROK - CHAT STREAMING WITH RAG provides GPT streaming capabilities.

STEP-BY-STEP SETUP
--------------------------------
 0) Register on xAI Grok and get your xAI GROK API KEY.

 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 and your xAI GROK  AI 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 xAI GROK - CHAT STREAMING WITH RAG to the page on which the chat must be integrated. Select the RESULT DATA TYPE as Threads (Azure AI).

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

 6) Integrate the logic into your application using the following xAI GROK - CHAT STREAMING WITH RAG element's states and actions:

 FIELDS:
   - RESULT DATA TYPE : Must always be selected as Threads (xAI Grok).        
   - MODEL NAME : Name of the model. See https://console.x.ai. You may hide this data from eavesdroppers by using GET DATA FROM AN EXTERNAL API > xAI GROK - 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 > xAI GROK - ENCRYPT and set this field as result of this API.
   - APP DATA AGENT : 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.

 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 USER 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 xAI GROK - CHAT STREAMING WITH RAG :
 - ERROR : Error message upon Error event trigger.
 - IS STREAMING : Returns true when streaming is in progress.
 - FUNCTION NAME : Name of the function, set upon CALL FUNCTION event.
 - FUNCTION ARGUMENTS : Arguments of the function, set upon CALL FUNCTION event.
 - FUNCTION CALL ID : Unique identifier 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 TEXT INPUT TOKEN USAGE : Latest text input token usage of the AI engine, populated upon STREAMING ENDED event.
 - LATEST AUDIO INPUT TOKEN USAGE : Latest audio input token usage of the AI engine, populated upon STREAMING ENDED event.
 - LATEST IMAGE INPUT TOKEN USAGE : Latest image input token usage of the AI engine, populated upon STREAMING ENDED event.
 - LATEST CACHED INPUT TOKEN USAGE : Latest cached input token usage of the AI engine, populated upon STREAMING ENDED event.
 - LATEST COMPLETION OUTPUT TOKEN USAGE : Latest completion output token usage of the AI engine, populated upon STREAMING ENDED event.
 - LATEST REASONING OUTPUT TOKEN USAGE : Latest reasoning output token usage of the AI engine, populated upon STREAMING ENDED event.
 - 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.


 ELEMENT ACTIONS - TRIGGERED IN WORKFLOW:.
   - SEND USER PROMPT : Send Prompt to the specified Thread ID, which is autogenerated if not set.
  Inputs Fields :
       - PROMPT : The user prompt.
       - THREAD ID : Send the user prompt to this Thread ID. A valid Thread ID is one of the exposed state ALL THREADS. Autogenerated if not set.  
       - FUNCTIONS : Array containing functions definition. See https://cookbook.openai.com/examples/how_to_call_functions_with_chat_models#basic-concepts
       - TEMPERATURE :  What sampling temperature to use, between 0 and 2. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 for ones with a well-defined answer.
       WEB & NEWS SEARCH RETRIEVAL SETTINGS
       - WEB SEARCH : Allow models to search the web for the latest information before generating a response.
       - ALLOWED WEBSITES (WEB) : Domains should not include the HTTP/HTTPS scheme (use example.com instead of https://example.com) . Subdomains are automatically included, subpaths are supported.
       - EXCLUDED WEBSITES : Domains should not include the HTTP/HTTPS scheme (use example.com instead of https://example.com) . Subdomains are automatically included, subpaths are supported.
       - COUNTRY : 2-Letter ISO 3166-1 Country Code
       - SAFE SEARCH : Enable or disable safe search
       X SEARCH RETRIEVAL SETTINGS
       - X SEARCH : Allow models to search X for the latest information before generating a response.
       - X HANDLES : Search from those X handles only
       GLOBAL SEARCH SETTINGS
       - MAX SEARCH RESULTS : You can set a limit on how many data sources will be considered in the query/
   - 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.
   - SEND FUNCTION RESULT : Send the function results. See https://cookbook.openai.com/examples/how_to_call_functions_with_chat_models#basic-concepts
  Inputs Fields :
       - FUNCTION CALL ID : Unique identifier of the function call from FUNCTION CALL ID state, which is set upon set upon CALL FUNCTION event.
       - FUNCTION RESULT : Result of the function to pass.
       - TEMPERATURE : What sampling temperature to use, between 0 and 2. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 for ones with a well-defined answer.
   - 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.


 7) (Optional) Add the xAI GROK - MARKDOWN 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