Difference between revisions of "Edge AI SDK/GenAIChatbot"

From ESS-WIKI
Jump to: navigation, search
Line 1: Line 1:
 
 
 
 
 
= Introduction =
 
= Introduction =
  
Line 12: Line 9:
 
* <span style="font-size:larger;">Model Context Protocol (MCP) tools, which enable AI agents to perform actions.</span>
 
* <span style="font-size:larger;">Model Context Protocol (MCP) tools, which enable AI agents to perform actions.</span>
 
<span style="font-size:larger;">GenAI Chatbot features a flexible configuration suitable for diverse application scenarios and is optimized for embedded platforms such as the Ryzen AI 8000, NVIDIA Jetson Orin Nano, and Jetson Orin AGX.</span>
 
<span style="font-size:larger;">GenAI Chatbot features a flexible configuration suitable for diverse application scenarios and is optimized for embedded platforms such as the Ryzen AI 8000, NVIDIA Jetson Orin Nano, and Jetson Orin AGX.</span>
 +
 +
= Release =
 +
 +
== Changelog ==
 +
=== v1.0.1 (AMD & NVIDIA Support) - 2025-09-18 ===
 +
==== <span style="font-size:larger;"> New Features</span> ====
 +
* <span style="font-size:larger;">Introduced GenAI-Agent assistant : This allows you to integrate models with MCP tools, enabling the assistant to invoke tools and start a conversation or task.</span>
 +
* <span style="font-size:larger;">Added MCP Tool Support : Implemented the Model Context Protocol (MCP), which enables AI agents to perform actions, such as checking system information.</span>
 +
 +
==== <span style="font-size:larger;">Platform Support</span> ====
 +
* <span style="font-size:larger;">Added support for AMD Ryzen AI 300 and Ryzen AI 8000 platforms.</span>
 +
 +
=== v1.0.0 (Initial Release) - Release Date ===
 +
==== <span style="font-size:larger;">New Features</span> ====
 +
* <span style="font-size:larger;">Supports audio processing (Speech-to-Text [STT] and Text-to-Speech [TTS]).</span>
 +
* <span style="font-size:larger;">Supports Retrieval-Augmented Generation (RAG) for integrating with external knowledge bases.</span>
 +
* <span style="font-size:larger;">Includes an embedded vector database (VectorDB).</span>
 +
 +
==== <span style="font-size:larger;">Platform Support</span> ====
 +
* <span style="font-size:larger;">Optimized for NVIDIA Jetson Orin Nano and Jetson Orin AGX platforms.</span>
 +
 +
{| class="wikitable"
 +
|+
 +
|-
 +
! Feature
 +
! Introduced in Version
 +
! Description
 +
|-
 +
| GenAI-Agent assistant
 +
| 1.0.1
 +
| Integrates models and MCP tools, enabling the assistant to invoke tools and proactively perform tasks.
 +
|-
 +
| MCP Tools
 +
| 1.0.1
 +
| Enables the AI agent to perform actions.
 +
|-
 +
| AMD Ryzen Platform Support
 +
| 1.0.1
 +
| Added support for the Ryzen AI 8000 series.
 +
|-
 +
| NVIDIA Jetson Platform Support
 +
| 1.0.0
 +
| Support for Jetson Orin Nano/AGX.
 +
|-
 +
| RAG / Audio Processing
 +
| 1.0.0
 +
| Initial core features.
 +
|}
  
 
= How To =
 
= How To =
Line 287: Line 332:
 
*<span style="font-size:larger;">''An information button is provided next to each response. Clicking it reveals detailed performance and inference statistics for that response, including token counts, processing speed, and computation time. This allows developers to monitor and optimize system performance in real time.''</span>  
 
*<span style="font-size:larger;">''An information button is provided next to each response. Clicking it reveals detailed performance and inference statistics for that response, including token counts, processing speed, and computation time. This allows developers to monitor and optimize system performance in real time.''</span>  
  
== Using mcp tools ==
+
== Using mcp tools (v1.0.1) ==
  
 
=== 1. Verify the default MCP server in the GenAI-Chatbot tools ===
 
=== 1. Verify the default MCP server in the GenAI-Chatbot tools ===
Line 320: Line 365:
 
</div>
 
</div>
  
== Using GenAI Agent ==
+
== Using GenAI Agent (v1.0.1) ==
  
 
=== 1. Configure Agent Settings ===
 
=== 1. Configure Agent Settings ===
Line 367: Line 412:
 
<span style="font-size: 15.6px;">1. Make sure the select model is the RAG model.</span><br/> <span style="font-size:larger;">2. Click the mic icon&nbsp;to start voice mode.</span><br/> <span style="font-size:larger;">3. While speaking, the system will show a listening status.</span><br/> <span style="font-size:larger;">4. After speaking, your question will appear as text.</span><br/> <span style="font-size:larger;">5. The Medical Chatbot Assistant will response and play the answer with audio.</span>
 
<span style="font-size: 15.6px;">1. Make sure the select model is the RAG model.</span><br/> <span style="font-size:larger;">2. Click the mic icon&nbsp;to start voice mode.</span><br/> <span style="font-size:larger;">3. While speaking, the system will show a listening status.</span><br/> <span style="font-size:larger;">4. After speaking, your question will appear as text.</span><br/> <span style="font-size:larger;">5. The Medical Chatbot Assistant will response and play the answer with audio.</span>
 
</div>
 
</div>
 +
 +
== Creating an agent to get system information ==
 +
 +
=== <span style="font-size:large;"> [[#add-new-mcp-server-on-the-genai-chatbot|1. Add new mcp server on the Genai-Chatbot]] </span>===
 +
 +
&nbsp;
 +
 +
=== <span style="font-size:large;"> [[#using-genai-agent|2. Using GenAI Agent]] </span>===

Revision as of 09:01, 18 September 2025

Introduction

GenAI Chatbot is a next-generation conversational AI assistant designed to provide natural, context-aware interactions. At its core, it utilizes efficient Small Language Models (SLMs) and supports the direct import of models fine-tuned within GenAI Studio, enabling easy deployment and immediate use of custom models in the chatbot.

The chatbot features advanced capabilities, including:

  • Audio processing (Speech-to-Text [STT] and Text-to-Speech [TTS]).
  • Retrieval-Augmented Generation (RAG).
  • An embedded vector database (VectorDB).
  • Model Context Protocol (MCP) tools, which enable AI agents to perform actions.

GenAI Chatbot features a flexible configuration suitable for diverse application scenarios and is optimized for embedded platforms such as the Ryzen AI 8000, NVIDIA Jetson Orin Nano, and Jetson Orin AGX.

Release

Changelog

v1.0.1 (AMD & NVIDIA Support) - 2025-09-18

New Features

  • Introduced GenAI-Agent assistant : This allows you to integrate models with MCP tools, enabling the assistant to invoke tools and start a conversation or task.
  • Added MCP Tool Support : Implemented the Model Context Protocol (MCP), which enables AI agents to perform actions, such as checking system information.

Platform Support

  • Added support for AMD Ryzen AI 300 and Ryzen AI 8000 platforms.

v1.0.0 (Initial Release) - Release Date

New Features

  • Supports audio processing (Speech-to-Text [STT] and Text-to-Speech [TTS]).
  • Supports Retrieval-Augmented Generation (RAG) for integrating with external knowledge bases.
  • Includes an embedded vector database (VectorDB).

Platform Support

  • Optimized for NVIDIA Jetson Orin Nano and Jetson Orin AGX platforms.
Feature Introduced in Version Description
GenAI-Agent assistant 1.0.1 Integrates models and MCP tools, enabling the assistant to invoke tools and proactively perform tasks.
MCP Tools 1.0.1 Enables the AI agent to perform actions.
AMD Ryzen Platform Support 1.0.1 Added support for the Ryzen AI 8000 series.
NVIDIA Jetson Platform Support 1.0.0 Support for Jetson Orin Nano/AGX.
RAG / Audio Processing 1.0.0 Initial core features.

How To

Download Models from Ollama (Support Device: Nvidia)

Ollama-1.png
  • Go to the page https://www.ollama.com/search and click on the "Models" tab as shown in Icon 1.
  • Use the search bar shown in Icon 2 to find the model you want to download.
  • In Icon 3, locate the name of the model.

 

 

Ollama-2.png
  • After clicking in, you'll see the name and version of the model you need to download.
  • Please note that the model size depends on your hardware resources.
  • Make sure your hardware matches the specifications shown in the table above.

 

 

Ollama-3.png
  • Go back to GenAI-Chatbot and create new chat window, as shown in Icon 1.
  • Enter the model name you just saw into the search bar in the chat window, as shown in Icon 2.
  • Then, click the download button at the location marked in Icon 3.

 

 

Ollama-4.png
  • After clicking the download button, a notification will pop up.

 

 

Ollama-5.png
  • After the download is complete, a notification will appear confirming the completion.

 

 

Ollama-6.png
  • Next, you'll be able to find the model you downloaded in the model selection menu.

Delete Models on GenAI-Chatbot (Support Device: Nvidia)

Delete-1.png
  • Click on icon 1 "User" to enter the Admin Panel (icon 2).
  • After entering "Settings," click on icon 3 "Models."
  • Click the download icon (icon 4) on the right.

 

Delete-2.png
  • After the window pops up, find the option to delete the model at the location of icon 1.
  • After selecting the model you want to delete, click on icon 2 "Delete."

 

Delete-3.png
  • Click "Confirm".

 

Delete-4.png
  • A notification will pop up after a successful operation.

Download SLM Models from GenAI Studio

Genai-studio-1.png
  • Click GenAI Studio Hub from the left menu.
  • Enter the URL of your GenAI Studio.
  • Click the "Save" 
  • Once the configuration is successful, a notification will appear as shown at icon 4.
  • Displays a list of all models supported by GenAI Studio.
  • Click on icon 6 to download the desired model.

 

 

Genai-studio-3.png
  • After the download is complete, a notification will appear, and the icon will change to a completion icon.

 

Genai-studio-4.png
  • After the model has downloaded, you can select this LLM Model in new Chat 

 

Create a new Knowledge

Rag-1.png
  • Client the Workspace from the left menu.
  • Go to the Knowledge.
  • Click the + icon to add a new knowledge.

Here are sample files: * PDF: tial_Q&As_About_Over-the-Counter_(OTC)_Medication_Use.pdf , * Text: 10_Essential_Q&As_About_Over-the-Counter_(OTC)_Medication_Use.txt  

 

Rag-2.png
  • Enter the title.
  • Enter the goal or description.
  • Click the "Create Knowledge" button to finish.

 

Rag-4.png
  • Click the "+" icon.
  • Click the "Upload files" to upload files.

 

Rag-5.png
  • Select the files you want to use.

 

Rag-6.png
  • After the upload, the files will be displayed and a success notification will appear.

 

Create a Chatbot Assistant with RAG ( Knowledge )

Rag-7.png
  • Go to the Models tab.
  • Click the "+" icon, to add a new model.

 

Rag-8.png
  • On the add new model page, fill in and select the required fields shown in the red box:
    • Click the "+" icon, to add a new model.
    • * Title, * Subtitle, * Base Model, and * System Prompt.

 

Rag-9.png

Continuing from the previous page,

  • Click the "Select Knowledge" to select the Knowledge you just created,
  • Click the "Save & Create" to save and create.

 

Rag-10.png
  • After successful creation, a notification will appear at icon 1.
  • Then, click on the model ( icon 2 ) to enter the model chat. Start the Assistant chat.

 

Rag-11.png
  • The chat window will display that the model in use is the Knowledge model you created.

 

Rag-12.png
  • After starting the conversation, you will see that the model retrieves information from the Knowledge you created in its responses.

 

Configuring TTS with Azure AI Speech API

Create an Account on Azure AI Speech API

1. Create an Azure account

Azure-1.png
  • Get started with Azure’s free account: new users receive $200 credit for 30 days and free access to popular services.
Azure-2.png
  • AI Speech – Text-to-Speech: 500,000 neural characters per month for free accounts

2. Set Up the Azure Speech Service

Azure-speech-1.png
Azure-speech-2.png
  • Click on icon 1: "AI + Machine Learning"
  • Then, click on icon 2: "Speech"
Azure-speech-3.png
  • Click on “Start” at the position marked by the red box.
Azure-speech-4.png
  • Click "Create" and fill in the necessary details:
    • Subscription: Choose your Azure subscription.
    • Resource Group: Select an existing group or create a new one.
    • Region: Choose a region close to your location.
    • Name: Provide a unique name for your Speech resource.
    • Pricing Tier: Select Free F0.
    • Click on icon 2: "Review + create"
Azure-speech-5.png
  • After confirming the information, click the “Create” button.
Azure-speech-6.png
  • After entering the overview page, click on the name link of the resource you created under "Resource."
Azure-speech-7.png
  • In the left-hand menu, click on "Keys and Endpoint".
  • Note down the Key1 or Key2 and the Endpoint URL; you'll need these to authenticate your API requests.

 

Setup the Azue Text-to-Speec in GenAI Chatbot

Stt-tts-1.png
  • Click the"Admin Panel."

 

Stt-tts-2.png
  • Click the Audio
  • Select the "Text-to-Speech Engine" with "Azure AI Speech".

 

Stt-tts-3.png
  • Enter the Azure AI Speech API token in API Key.
  • Click the "Save" icon.
  • Finally, you will see a success notification.

Evaluate the Benchmark of Each Chatbot Response

Chatbot-benchmark.png
  • An information button is provided next to each response. Clicking it reveals detailed performance and inference statistics for that response, including token counts, processing speed, and computation time. This allows developers to monitor and optimize system performance in real time.

Using mcp tools (v1.0.1)

1. Verify the default MCP server in the GenAI-Chatbot tools

Mcp-tool-1 1757558120013.png

  • Click User.
  • Select Admin Panel.
  • Open the Tools section.
  • Under Manage Tool Server, ensure that file-utils / mcp-system-info are listed.
  • Click Save to apply the changes.

2. Open a new chat and select the tools

Mcp-tool-2 1757558139296.png

  • Select New Chat.
  • Click the “+” button in the chat window.
  • Choose the tool to open, e.g., system-info.
  • Verify that the tool icon appears next to the “+” button, with the number of icons corresponding to the number of selected tools.

3. Use the tool to obtain system information

  • Example: Ask the LLM model → “What is the current memory usage?

Mcp-tool-3 1756969033152.png

4. Review the MCP server APIs and available functions

Image 1757556413952.png

Using GenAI Agent (v1.0.1)

1. Configure Agent Settings

Ai-agent-1 1757558170990.png

  • Click User.
  • Select Admin Panel.
  • Open the Agent section.
  • Select model.
  • Select tools.
  • Click Save to apply the changes.
  • Click Test button.

2. Start GenAI-Agent assistant

  • The GenAI-Agent assistant will appear, allowing you to invoke tools and start a conversation.

Ai-agent-2 1757558303765.png

Ai-agent-3 1757558242087.png

 

Example

Creating an Audio + RAG Chatbot for Medication Assistant

GenAI Chatbot DevKit

1. Configuring TTS with Azure AI Speech API

(1). Create an Account on Azure AI Speech API
(2). Setting Up on GenAI Chatbot
 

2. Create a Knowledge

 

3. Create a Chatbot Assistant with RAG ( Knowledge )

 

4. Start a voice chatbot assistant with RAG

 

Rag-stt-tts-4.png

1. Make sure the select model is the RAG model.
2. Click the mic icon to start voice mode.
3. While speaking, the system will show a listening status.
4. After speaking, your question will appear as text.
5. The Medical Chatbot Assistant will response and play the answer with audio.

Creating an agent to get system information

1. Add new mcp server on the Genai-Chatbot

 

2. Using GenAI Agent