Difference between revisions of "Edge AI SDK/GenAIChatbot"

From ESS-WIKI
Jump to: navigation, search
(Speak)
Line 3: Line 3:
  
 
= Introduction =
 
= Introduction =
GenAI Chatbot is a next-generation conversational AI assistant built on the [https://ollama.com/search OLLAMA] architecture, supporting all models compatible with [https://ollama.com/search OLLAMA]. Designed for seamless integration with [https://genai-studio.gitbook.io/docs GenAI Studio], it allows users to directly import models that have been fine-tuned within [https://genai-studio.gitbook.io/docs GenAI Studio], enabling easy deployment and immediate use of custom models in the chatbot. At its core, GenAI Chatbot utilizes efficient Small Language Models (SLMs) to provide natural, context-aware interactions. The chatbot features advanced capabilities, including audio processing (Speech-to-Text [STT], Text-to-Speech [TTS]), Retrieval-Augmented Generation (RAG), and an embedded vector database (VectorDB), all within a flexible configuration suitable for diverse application scenarios. It is currently optimized for embedded platforms such as NVIDIA Jetson Orin Nano and Jetson Orin AGX.
+
 
 +
<span style="font-size:larger;">GenAI Chatbot is a next-generation conversational AI assistant built on the [https://ollama.com/search OLLAMA] architecture, supporting all models compatible with [https://ollama.com/search OLLAMA]. Designed for seamless integration with [https://genai-studio.gitbook.io/docs GenAI Studio], it allows users to directly import models that have been fine-tuned within [https://genai-studio.gitbook.io/docs GenAI Studio], enabling easy deployment and immediate use of custom models in the chatbot. At its core, GenAI Chatbot utilizes efficient Small Language Models (SLMs) to provide natural, context-aware interactions. The chatbot features advanced capabilities, including audio processing (Speech-to-Text [STT], Text-to-Speech [TTS]), Retrieval-Augmented Generation (RAG), and an embedded vector database (VectorDB), all within a flexible configuration suitable for diverse application scenarios. It is currently optimized for embedded platforms such as NVIDIA Jetson Orin Nano and Jetson Orin AGX.</span>
  
 
== SLM Chatbot ==
 
== SLM Chatbot ==
The GenAI Chatbot utilizes a Small Language Model (SLM) as its core engine. SLMs provide efficient language understanding and generation capabilities, delivering fast and accurate responses with low computational overhead. This allows the chatbot to operate smoothly on both edge devices and server environments.
+
 
 +
<span style="font-size:larger;">The GenAI Chatbot utilizes a Small Language Model (SLM) as its core engine. SLMs provide efficient language understanding and generation capabilities, delivering fast and accurate responses with low computational overhead. This allows the chatbot to operate smoothly on both edge devices and server environments.</span>
  
 
== Integrate with [https://genai-studio.gitbook.io/docs GenAI Studio] ==
 
== Integrate with [https://genai-studio.gitbook.io/docs GenAI Studio] ==
GenAI Chatbot is fully integrated with GenAI Studio, the AI LLM model management platform. Within [https://genai-studio.gitbook.io/docs GenAI Studio], users can:
+
 
*Perform model fine-tuning.
+
<span style="font-size:larger;">GenAI Chatbot is fully integrated with GenAI Studio, the AI LLM model management platform. Within [https://genai-studio.gitbook.io/docs GenAI Studio], users can:</span>
*Access a variety of model quantization methods for deployment on different hardware.
+
 
*Convert models easily to the formats required by various platforms.
+
*<span style="font-size:larger;">Perform model fine-tuning.</span>
*Customize and personalize AI models with ease.
+
*<span style="font-size:larger;">Access a variety of model quantization methods for deployment on different hardware.</span>
This integration significantly simplifies the process of deploying and customizing chatbots for both enterprises and developers.
+
*<span style="font-size:larger;">Convert models easily to the formats required by various platforms.</span>
 +
*<span style="font-size:larger;">Customize and personalize AI models with ease.</span>
 +
 
 +
<span style="font-size:larger;">This integration significantly simplifies the process of deploying and customizing chatbots for both enterprises and developers.</span>
  
 
== Audio ==
 
== Audio ==
*Speech-to-Text (STT)
 
GenAI Chatbot supports natural voice input, automatically converting user speech queries into text for processing. The system can flexibly integrate with a variety of Speech-to-Text (STT) engines and providers. By default, it uses the '''Whisper-base''' model and supports integration with OpenAI API, Web Browser API, Deepgram API, and Azure AI Speech API, making it easy to connect to different STT services as needed.
 
  
*Text-to-Speech (TTS)
+
*<span style="font-size:medium;">Speech-to-Text (STT)</span>
Chatbot responses can be automatically converted to natural-sounding speech using Text-to-Speech (TTS). Users are free to choose different voices and languages. The system supports the '''Web API''' by default and can be integrated with OpenAI API, Transformers, ElevenLabs, and Azure AI Speech API, providing flexible options for TTS services.
+
 
 +
<span style="font-size:larger;">GenAI Chatbot supports natural voice input, automatically converting user speech queries into text for processing. The system can flexibly integrate with a variety of Speech-to-Text (STT) engines and providers. By default, it uses the '''Whisper-base''' model and supports integration with OpenAI API, Web Browser API, Deepgram API, and Azure AI Speech API, making it easy to connect to different STT services as needed.</span>
 +
 
 +
*<span style="font-size:medium;">Text-to-Speech (TTS)</span>
 +
 
 +
<span style="font-size:larger;">Chatbot responses can be automatically converted to natural-sounding speech using Text-to-Speech (TTS). Users are free to choose different voices and languages. The system supports the '''Web API''' by default and can be integrated with OpenAI API, Transformers, ElevenLabs, and Azure AI Speech API, providing flexible options for TTS services.</span>
  
 
== RAG ==
 
== RAG ==
GenAI Chatbot supports Retrieval-Augmented Generation (RAG), combining large language models (LLMs) with external knowledge bases to greatly improve the accuracy and depth of answers. This makes it suitable for knowledge-based Q&A, document search, FAQ systems, and various information retrieval scenarios.
 
  
*Embedded
+
<span style="font-size:larger;">GenAI Chatbot supports Retrieval-Augmented Generation (RAG), combining large language models (LLMs) with external knowledge bases to greatly improve the accuracy and depth of answers. This makes it suitable for knowledge-based Q&A, document search, FAQ systems, and various information retrieval scenarios.</span>
**The system converts various documents, knowledge sources, or custom content into vector (embedding) representations to enable efficient semantic search.
+
 
**By default, the '''sentence-transformers/all-MiniLM-L6-v2''' model is used for embeddings, balancing computational efficiency and semantic understanding.
+
*<span style="font-size:larger;">Embedded</span>
**Supports automatic embedding of multilingual documents and multiple file formats (such as txt, pdf, markdown, html, etc.).
+
**<span style="font-size:larger;">The system converts various documents, knowledge sources, or custom content into vector (embedding) representations to enable efficient semantic search.</span>
**Custom embedding models are supported to flexibly meet the needs of different professional domains.
+
**<span style="font-size:larger;">By default, the '''sentence-transformers/all-MiniLM-L6-v2''' model is used for embeddings, balancing computational efficiency and semantic understanding.</span>
 +
**<span style="font-size:larger;">Supports automatic embedding of multilingual documents and multiple file formats (such as txt, pdf, markdown, html, etc.).</span>
 +
**<span style="font-size:larger;">Custom embedding models are supported to flexibly meet the needs of different professional domains.</span> 
  
*VecorDB
+
*<span style="font-size:larger;">VecorDB</span>
**The generated embeddings are stored in a VectorDB (vector database), supporting large-scale, efficient semantic search and matching.
+
**<span style="font-size:larger;">The generated embeddings are stored in a VectorDB (vector database), supporting large-scale, efficient semantic search and matching.</span>
**By default, '''ChromaDB''' is used as the vector database, offering real-time retrieval and ease of deployment and management.
+
**<span style="font-size:larger;">By default, '''ChromaDB''' is used as the vector database, offering real-time retrieval and ease of deployment and management.</span>
**The system can be extended to support other mainstream VectorDBs, such as Pinecone, Weaviate, Qdrant, etc., making it suitable for enterprise or cloud-based deployments.
+
**<span style="font-size:larger;">The system can be extended to support other mainstream VectorDBs, such as Pinecone, Weaviate, Qdrant, etc., making it suitable for enterprise or cloud-based deployments.</span>
**Built-in features such as deduplication, sharding, and data weighting ensure query efficiency and result quality.
+
**<span style="font-size:larger;">Built-in features such as deduplication, sharding, and data weighting ensure query efficiency and result quality.</span> 
  
 
= How To =
 
= How To =
== '''Download SLM Models from GenAI Studio''' ==  
+
 
 +
== '''Download SLM Models from GenAI Studio''' ==
 +
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 +
[[File:Genai-studio-1.png|none|900x600px|Genai-studio-1.png]]
 +
</div>
 +
*<span style="font-size:larger;">''Click on icon 1 to open the GenAI Studio Hub page.''</span>
 +
*<span style="font-size:larger;">''At icon 2, enter the URL of your GenAI Studio.''</span>
 +
*<span style="font-size:larger;">''Click on icon 3 to save your settings.''</span>
 +
*<span style="font-size:larger;">''Once the configuration is successful, a notification will appear as shown at icon 4.''</span>
 +
*<span style="font-size:larger;">''Icon 5 displays a list of all models supported by GenAI Studio.''</span>
 +
*<span style="font-size:larger;">''Click on icon 6 to download the desired model.''</span>
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Genai-studio-1.png|none|900x600px|]]
+
[[File:Genai-studio-2.png|none|900x600px|Genai-studio-2.png]]
</div>
+
</div>  
*''Click on icon 1 to open the GenAI Studio Hub page.''
+
*<span style="font-size:larger;">''Once the download begins, a loading icon will be displayed.''</span>
*''At icon 2, enter the URL of your GenAI Studio.''
 
*''Click on icon 3 to save your settings.''
 
*''Once the configuration is successful, a notification will appear as shown at icon 4.''
 
*''Icon 5 displays a list of all models supported by GenAI Studio.''
 
*''Click on icon 6 to download the desired model.''
 
 
 
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Genai-studio-2.png|none|900x600px|]]
+
[[File:Genai-studio-3.png|none|900x600px|Genai-studio-3.png]]
</div>
+
</div>  
*''Once the download begins, a loading icon will be displayed.''
+
*<span style="font-size:larger;">''After the download is complete, a notification will appear, and the download icon will change to a completion icon.''</span>
 
 
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Genai-studio-3.png|none|900x600px|]]
+
[[File:Genai-studio-4.png|none|900x600px|Genai-studio-4.png]]
</div>
+
</div>  
*''After the download is complete, a notification will appear, and the download icon will change to a completion icon.''
+
*<span style="font-size:larger;">''After the model has finished downloading, click on icon 1 to create a new conversation.''</span>
 +
*<span style="font-size:larger;">''Next, click on icon 2 to select the model you just downloaded and start using it.''</span>
  
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
+
&nbsp;
[[File:Genai-studio-4.png|none|900x600px|]]
 
</div>
 
*''After the model has finished downloading, click on icon 1 to create a new conversation.''
 
*''Next, click on icon 2 to select the model you just downloaded and start using it.''
 
<br clear="all" />
 
  
 
== '''Crate a new chatbot assistant with RAG''' ==
 
== '''Crate a new chatbot assistant with RAG''' ==
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Rag-1.png|none|900x600px|]]
+
[[File:Rag-1.png|none|900x600px|Rag-1.png]]
</div>
+
</div>  
*''Click on icon 1 to open the Workspace page.''
+
*<span style="font-size:larger;">''Click on icon 1 to open the Workspace page.''</span>
*''Click on icon 2 to open the Knowledge settings.''
+
*<span style="font-size:larger;">''Click on icon 2 to open the Knowledge settings.''</span>
*''Click on icon 3 to add new Knowledge.''
+
*<span style="font-size:larger;">''Click on icon 3 to add new Knowledge.''</span>
 
+
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 +
[[File:Rag-2.png|none|900x600px|Rag-2.png]]
 +
</div>
 +
*<span style="font-size:larger;">''Enter the title at icon 1.''</span>
 +
*<span style="font-size:larger;">''Enter the content at icon 2.''</span>
 +
*<span style="font-size:larger;">''Click on icon 3 to create the Knowledge.''</span>
 +
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 +
[[File:Rag-3.png|none|900x600px|Rag-3.png]]
 +
</div>
 +
*<span style="font-size:larger;">''After creation is complete, a notification will appear.''</span>
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Rag-2.png|none|900x600px|]]
+
[[File:Rag-4.png|none|900x600px|Rag-4.png]]
</div>
+
</div>  
*''Enter the title at icon 1.''
+
*<span style="font-size:larger;">''The page will automatically switch back to the Knowledge section. Click on icon 1 to select the Knowledge you just created and upload the required files.''</span>
*''Enter the content at icon 2.''
 
*''Click on icon 3 to create the Knowledge.''
 
 
 
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Rag-3.png|none|900x600px|]]
+
[[File:Rag-5.png|none|900x600px|Rag-5.png]]
</div>
+
</div>  
*''After creation is complete, a notification will appear.''
+
*<span style="font-size:larger;">''Click on icon 1, the "+" icon.''</span>
 
+
*<span style="font-size:larger;">''Click on icon 2, "Upload files."''</span>
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Rag-4.png|none|900x600px|]]
+
[[File:Rag-6.png|none|900x600px|Rag-6.png]]
</div>
+
</div>  
*''The page will automatically switch back to the Knowledge section. Click on icon 1 to select the Knowledge you just created and upload the required files.''
+
*<span style="font-size:larger;">''A file selection window will pop up. Select the files you want to use.''</span>
 
 
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Rag-5.png|none|900x600px|]]
+
[[File:Rag-7.png|none|900x600px|Rag-7.png]]
</div>
+
</div>  
*'' Click on icon 1, the "+" icon. ''
+
*<span style="font-size:larger;">''After the upload, the files will be displayed and a success notification will appear.''</span>
*'' Click on icon 2, "Upload files." ''
 
 
 
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Rag-6.png|none|900x600px|]]
+
[[File:Rag-8.png|none|900x600px|Rag-8.png]]
</div>
+
</div>  
*''A file selection window will pop up. Select the files you want to use.''
+
*<span style="font-size:larger;">''After the Knowledge is created, click on icon 1 to go to the Models page.''</span>
 
+
*<span style="font-size:larger;">''Click on icon 2, the "+" icon, to add a new knowledge model.''</span>
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Rag-7.png|none|900x600px|]]
+
[[File:Rag-9.png|none|900x600px|Rag-9.png]]
</div>
+
</div>  
*''After the upload, the files will be displayed and a success notification will appear.''
+
*<span style="font-size:larger;">''On the add new model page, fill in and select the required fields shown in the red box: Title, Subtitle, Base Model, and System Prompt.''</span>
 
 
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Rag-8.png|none|900x600px|]]
+
[[File:Rag-10.png|none|900x600px|Rag-10.png]]
</div>
+
</div>  
*''After the Knowledge is created, click on icon 1 to go to the Models page.''
+
*<span style="font-size:larger;">''Continuing from the previous page, click on icon 1 to select the Knowledge you just created, then click on icon 2 to save and create the model.''</span>
*''Click on icon 2, the "+" icon, to add a new knowledge model.''
 
 
 
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Rag-9.png|none|900x600px|]]
+
[[File:Rag-11.png|none|900x600px|Rag-11.png]]
</div>
+
</div>  
*''On the add new model page, fill in and select the required fields shown in the red box: Title, Subtitle, Base Model, and System Prompt.''
+
*<span style="font-size:larger;">''After successful creation, a notification will appear at icon 1. Then, click on the model at icon 2 to enter the model chat.''</span>
 
 
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Rag-10.png|none|900x600px|]]
+
[[File:Rag-12.png|none|900x600px|Rag-12.png]]
</div>
+
</div>  
*''Continuing from the previous page, click on icon 1 to select the Knowledge you just created, then click on icon 2 to save and create the model.''
+
*<span style="font-size:larger;">''The chat window will display that the model in use is the Knowledge model you created.''</span>
 
 
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Rag-11.png|none|900x600px|]]
+
[[File:Rag-13.png|none|900x600px|Rag-13.png]]
</div>
+
</div>  
*''After successful creation, a notification will appear at icon 1. Then, click on the model at icon 2 to enter the model chat.''
+
*<span style="font-size:larger;">''After starting the conversation, you will see that the model retrieves information from the Knowledge you created in its responses.''</span>
  
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
+
&nbsp;
[[File:Rag-12.png|none|900x600px|]]
 
</div>
 
*''The chat window will display that the model in use is the Knowledge model you created.''
 
  
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
+
== '''Speak''' ==
[[File:Rag-13.png|none|900x600px|]]
 
</div>
 
*''After starting the conversation, you will see that the model retrieves information from the Knowledge you created in its responses.''
 
<br clear="all" />
 
  
== '''Speak''' ==
+
*<span style="font-size:medium;">Audio to Azure AI Speech API</span>
*Audio to Azure AI Speech API
 
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Stt-tts-1.png|none|900x600px|]]
+
[[File:Stt-tts-1.png|none|900x600px|Stt-tts-1.png]]
</div>
+
</div>  
*''Select icon 1 and click on "Admin Panel." ''
+
*<span style="font-size:larger;">''Select icon 1 and click on "Admin Panel."''</span>
 
 
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Stt-tts-2.png|none|900x600px|]]
+
[[File:Stt-tts-2.png|none|900x600px|Stt-tts-2.png]]
</div>
+
</div>  
*''Go to the Settings page and click on icon 1, "Audio." ''
+
*<span style="font-size:larger;">''Go to the Settings page and click on icon 1, "Audio."''</span>
*''Find the TTS Settings section and select the Engine you want to use, as shown at icon 2: "Azure AI Speech" ''
+
*<span style="font-size:larger;">''Find the TTS Settings section and select the Engine you want to use, as shown at icon 2: "Azure AI Speech"''</span>
 
 
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Stt-tts-3.png|none|900x600px|]]
+
[[File:Stt-tts-3.png|none|900x600px|Stt-tts-3.png]]
</div>
+
</div>  
*''Enter the Azure AI Speech API token at icon 1.''
+
*<span style="font-size:larger;">''Enter the Azure AI Speech API token at icon 1.''</span>
*''Click on icon 2, "Save." ''
+
*<span style="font-size:larger;">''Click on icon 2, "Save."''</span>
*''Finally, you will see a success notification at icon 3.''
+
*<span style="font-size:larger;">''Finally, you will see a success notification at icon 3.''</span>
 
 
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
 
<div style="display:inline-block; box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:12px;">
[[File:Stt-tts-4.png|none|900x600px|]]
+
[[File:Stt-tts-4.png|none|900x600px|Stt-tts-4.png]]
</div>
+
</div>  
*''Go to the chat window and click on icon 1, the conversation icon.''
+
*<span style="font-size:larger;">''Go to the chat window and click on icon 1, the conversation icon.''</span>
*''An icon will appear at the position of icon 2, indicating that the feature is ready to use.''
+
*<span style="font-size:larger;">''An icon will appear at the position of icon 2, indicating that the feature is ready to use.''</span>  
<br clear="all" />
 
 
 
== Configuration ==
 
- Set Azure TTS Service
 
  
 
 
[[Category:Editor]]
 
[[Category:Editor]]

Revision as of 10:55, 20 May 2025

Brief of GenAI Chatbot

Introduction

GenAI Chatbot is a next-generation conversational AI assistant built on the OLLAMA architecture, supporting all models compatible with OLLAMA. Designed for seamless integration with GenAI Studio, it allows users to directly import models that have been fine-tuned within GenAI Studio, enabling easy deployment and immediate use of custom models in the chatbot. At its core, GenAI Chatbot utilizes efficient Small Language Models (SLMs) to provide natural, context-aware interactions. The chatbot features advanced capabilities, including audio processing (Speech-to-Text [STT], Text-to-Speech [TTS]), Retrieval-Augmented Generation (RAG), and an embedded vector database (VectorDB), all within a flexible configuration suitable for diverse application scenarios. It is currently optimized for embedded platforms such as NVIDIA Jetson Orin Nano and Jetson Orin AGX.

SLM Chatbot

The GenAI Chatbot utilizes a Small Language Model (SLM) as its core engine. SLMs provide efficient language understanding and generation capabilities, delivering fast and accurate responses with low computational overhead. This allows the chatbot to operate smoothly on both edge devices and server environments.

Integrate with GenAI Studio

GenAI Chatbot is fully integrated with GenAI Studio, the AI LLM model management platform. Within GenAI Studio, users can:

  • Perform model fine-tuning.
  • Access a variety of model quantization methods for deployment on different hardware.
  • Convert models easily to the formats required by various platforms.
  • Customize and personalize AI models with ease.

This integration significantly simplifies the process of deploying and customizing chatbots for both enterprises and developers.

Audio

  • Speech-to-Text (STT)

GenAI Chatbot supports natural voice input, automatically converting user speech queries into text for processing. The system can flexibly integrate with a variety of Speech-to-Text (STT) engines and providers. By default, it uses the Whisper-base model and supports integration with OpenAI API, Web Browser API, Deepgram API, and Azure AI Speech API, making it easy to connect to different STT services as needed.

  • Text-to-Speech (TTS)

Chatbot responses can be automatically converted to natural-sounding speech using Text-to-Speech (TTS). Users are free to choose different voices and languages. The system supports the Web API by default and can be integrated with OpenAI API, Transformers, ElevenLabs, and Azure AI Speech API, providing flexible options for TTS services.

RAG

GenAI Chatbot supports Retrieval-Augmented Generation (RAG), combining large language models (LLMs) with external knowledge bases to greatly improve the accuracy and depth of answers. This makes it suitable for knowledge-based Q&A, document search, FAQ systems, and various information retrieval scenarios.

  • Embedded
    • The system converts various documents, knowledge sources, or custom content into vector (embedding) representations to enable efficient semantic search.
    • By default, the sentence-transformers/all-MiniLM-L6-v2 model is used for embeddings, balancing computational efficiency and semantic understanding.
    • Supports automatic embedding of multilingual documents and multiple file formats (such as txt, pdf, markdown, html, etc.).
    • Custom embedding models are supported to flexibly meet the needs of different professional domains.
  • VecorDB
    • The generated embeddings are stored in a VectorDB (vector database), supporting large-scale, efficient semantic search and matching.
    • By default, ChromaDB is used as the vector database, offering real-time retrieval and ease of deployment and management.
    • The system can be extended to support other mainstream VectorDBs, such as Pinecone, Weaviate, Qdrant, etc., making it suitable for enterprise or cloud-based deployments.
    • Built-in features such as deduplication, sharding, and data weighting ensure query efficiency and result quality.

How To

Download SLM Models from GenAI Studio

Genai-studio-1.png
  • Click on icon 1 to open the GenAI Studio Hub page.
  • At icon 2, enter the URL of your GenAI Studio.
  • Click on icon 3 to save your settings.
  • Once the configuration is successful, a notification will appear as shown at icon 4.
  • Icon 5 displays a list of all models supported by GenAI Studio.
  • Click on icon 6 to download the desired model.
Genai-studio-2.png
  • Once the download begins, a loading icon will be displayed.
Genai-studio-3.png
  • After the download is complete, a notification will appear, and the download icon will change to a completion icon.
Genai-studio-4.png
  • After the model has finished downloading, click on icon 1 to create a new conversation.
  • Next, click on icon 2 to select the model you just downloaded and start using it.

 

Crate a new chatbot assistant with RAG

Rag-1.png
  • Click on icon 1 to open the Workspace page.
  • Click on icon 2 to open the Knowledge settings.
  • Click on icon 3 to add new Knowledge.
Rag-2.png
  • Enter the title at icon 1.
  • Enter the content at icon 2.
  • Click on icon 3 to create the Knowledge.
Rag-3.png
  • After creation is complete, a notification will appear.
Rag-4.png
  • The page will automatically switch back to the Knowledge section. Click on icon 1 to select the Knowledge you just created and upload the required files.
Rag-5.png
  • Click on icon 1, the "+" icon.
  • Click on icon 2, "Upload files."
Rag-6.png
  • A file selection window will pop up. Select the files you want to use.
Rag-7.png
  • After the upload, the files will be displayed and a success notification will appear.
Rag-8.png
  • After the Knowledge is created, click on icon 1 to go to the Models page.
  • Click on icon 2, the "+" icon, to add a new knowledge model.
Rag-9.png
  • On the add new model page, fill in and select the required fields shown in the red box: Title, Subtitle, Base Model, and System Prompt.
Rag-10.png
  • Continuing from the previous page, click on icon 1 to select the Knowledge you just created, then click on icon 2 to save and create the model.
Rag-11.png
  • After successful creation, a notification will appear at icon 1. Then, click on the model at icon 2 to enter the model chat.
Rag-12.png
  • The chat window will display that the model in use is the Knowledge model you created.
Rag-13.png
  • After starting the conversation, you will see that the model retrieves information from the Knowledge you created in its responses.

 

Speak

  • Audio to Azure AI Speech API
Stt-tts-1.png
  • Select icon 1 and click on "Admin Panel."
Stt-tts-2.png
  • Go to the Settings page and click on icon 1, "Audio."
  • Find the TTS Settings section and select the Engine you want to use, as shown at icon 2: "Azure AI Speech"
Stt-tts-3.png
  • Enter the Azure AI Speech API token at icon 1.
  • Click on icon 2, "Save."
  • Finally, you will see a success notification at icon 3.
Stt-tts-4.png
  • Go to the chat window and click on icon 1, the conversation icon.
  • An icon will appear at the position of icon 2, indicating that the feature is ready to use.