1"use strict";(self.webpackChunkqtrobot_documentation=self.webpackChunkqtrobot_documentation||[]).push([[6426],{98085:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var a=s(74848),t=s(28453),i=s(77072);const r={id:"qt_ai_assistant",title:"QTrobot: Your AI Data Assistant",hide_table_of_contents:!0,pagination_label:"QTrobot-Your AI Data Assistant"},o=void 0,l={id:"tutorials/AI/qt_ai_assistant",title:"QTrobot: Your AI Data Assistant",description:"track_changes Goal: This project demonstrates how to use offline LLM and RAG to build conversational data assistant",source:"@site/docs/tutorials/AI/qt_ai_assistant.mdx",sourceDirName:"tutorials/AI",slug:"/tutorials/AI/qt_ai_assistant",permalink:"/docs/tutorials/AI/qt_ai_assistant",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"qt_ai_assistant",title:"QTrobot: Your AI Data Assistant",hide_table_of_contents:!0,pagination_label:"QTrobot-Your AI Data Assistant"},sidebar:"code_tutorials_sidebar",previous:{title:"Using QTrobot with JavaScript",permalink:"/docs/tutorials/javascript/js_ros_interfaces"},next:{title:"QTrobot-Your Online AI Data Assistant",permalink:"/docs/tutorials/AI/qt_online_ai_assistant"}},d={},c=[{value:"Table of Contents",id:"table-of-contents",level:2},{value:"Features",id:"features",level:2},{value:"Technologies Used",id:"technologies-used",level:2},{value:"Getting Started",id:"getting-started",level:2},{value:"Installation",id:"installation",level:3},{value:"Usage",id:"usage",level:3},{value:"Run the QTrobot Data Assistant with demo data:",id:"run-the-qtrobot-data-assistant-with-demo-data",level:4},{value:"Run the QTrobot Data Assistant with your own data:",id:"run-the-qtrobot-data-assistant-with-your-own-data",level:4},{value:"Pause and Resume the conversation with voice command",id:"pause-and-resume-the-conversation-with-voice-command",level:4},{value:"Customization",id:"customization",level:3},{value:"Using a different converation language:",id:"using-a-different-converation-language",level:4},{value:"Using different document formats:",id:"using-different-document-formats",level:4},{value:"Customizing the QTrobot's Role",id:"customizing-the-qtrobots-role",level:4},{value:"Why Customizing the Role is Interesting",id:"why-customizing-the-role-is-interesting",level:5},{value:"Choosing a different LLM model for conversation:",id:"choosing-a-different-llm-model-for-conversation",level:4},{value:"Enabling scene undertanding:",id:"enabling-scene-undertanding",level:4},{value:"Disabling Retrieval-Augmented Generation:",id:"disabling-retrieval-augmented-generation",level:4},{value:"Storing and restoring conversations",id:"storing-and-restoring-conversations",level:4},{value:"Command-line parameters",id:"command-line-parameters",level:4},{value:"QTrobot Data Assistant - Web UI Access",id:"qtrobot-data-assistant---web-ui-access",level:4},{value:"License",id:"license",level:2},{value:"Copyright",id:"copyright",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",h5:"h5",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.admonition,{title:"Overview",type:"info",children:(0,a.jsxs)(n.p,{children:[(0,a.jsx)("br",{})," ",(0,a.jsx)(i.A,{children:" track_changes "})," \xa0",(0,a.jsx)(n.strong,{children:"Goal:"}),"\xa0 ",(0,a.jsx)(n.em,{children:"This project demonstrates how to use offline LLM and RAG to build conversational data assistant"}),"\n",(0,a.jsx)("br",{})," ",(0,a.jsx)(i.A,{children:" code "})," \xa0",(0,a.jsx)(n.strong,{children:"Source code:"}),"\xa0 ",(0,a.jsx)(n.em,{children:(0,a.jsx)(n.a,{href:"https://github.com/luxai-qtrobot/tutorials/tree/master/demos/qt_ai_data_assistant",children:"Check the source code here"})}),"\n",(0,a.jsx)("br",{})," ",(0,a.jsx)(i.A,{children:" task_alt "})," \xa0",(0,a.jsx)(n.strong,{children:"Requirements:"}),"\xa0 ",(0,a.jsx)(n.a,{href:"https://luxai.com/humanoid-social-robot-for-research-and-teaching/",children:(0,a.jsx)(n.em,{children:"QTrobot AI@Edge"})})]})}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"The AI Data Assistant"})," is a project that demonstrate how to transform QTrobot (",(0,a.jsx)(n.a,{href:"https://luxai.com/humanoid-social-robot-for-research-and-teaching/",children:"QTrobotAI@Edge"}),") into a powerful, on-device AI assistant capable of engaging in natural voice conversations. By integrating advanced technologies such as Retrieval-Augmented Generation (RAG), Offline LLM, Automatic Speech Recognition (ASR), Scene Understanding via Visual Language Models (VLM), and Text-to-Speech (TTS), QTrobot can now understand, process, and provide insightful responses based on user-prov
1ided documents, visual inputs, and data in various spoken languages. To enhance the naturalness of interactions, QTrobot actively tracks the user's face and voice during conversations."]}),"\n",(0,a.jsxs)(n.p,{children:["This project is designed to showcase QTrobot's ability to serve as a private, secure, and highly customizable data assistant. Users can simply upload their documents (e.g., PDFs, Microsoft Word) to QTrobot and start asking questions or requesting information, all through natural voice interaction. The ",(0,a.jsx)(n.strong,{children:"entire process happens on-device"}),", ensuring privacy and security for the user's data."]}),"\n",(0,a.jsx)("center",{}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{style:{textAlign:"center"},children:(0,a.jsx)(n.img,{alt:"Multi Lingual",src:s(93058).A+"",width:"800",height:"451"})}),(0,a.jsx)(n.th,{style:{textAlign:"center"},children:(0,a.jsx)(n.img,{alt:"Multi User",src:s(41060).A+"",width:"800",height:"451"})}),(0,a.jsx)(n.th,{style:{textAlign:"center"},children:(0,a.jsx)(n.img,{alt:"Scene Understanding",src:s(25257).A+"",width:"800",height:"451"})})]})}),(0,a.jsx)(n.tbody,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"center"},children:(0,a.jsxs)("a",{href:"https://storage-h5fvadg9aggzcje6.z03.azurefd.net/luxai-public/video/demos/qt_ai_assitant_multi_lingual.mp4",children:[" ",(0,a.jsx)(n.strong,{children:"Watch Multilingual Conversation Video"})]})}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:(0,a.jsxs)("a",{href:"https://storage-h5fvadg9aggzcje6.z03.azurefd.net/luxai-public/video/demos/qt_ai_assitant_multi_users.mp4",children:[" ",(0,a.jsx)(n.strong,{children:"Watch Multi-User Conversation Video"})]})}),(0,a.jsx)(n.td,{style:{textAlign:"center"},children:(0,a.jsxs)("a",{href:"https://storage-h5fvadg9aggzcje6.z03.azurefd.net/luxai-public/video/demos/qt_ai_assitant_scene_understanding.mp4",children:[" ",(0,a.jsx)(n.strong,{children:"Watch Scene Understanding Conversation Video"})]})})]})})]}),"\n","\n",(0,a.jsx)(n.h2,{id:"table-of-contents",children:"Table of Contents"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"#qtrobot-your-ai-data-assistant",children:"QTrobot: Your AI Data Assistant"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#features",children:"Features"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#technologies-used",children:"Technologies Used"})}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"#getting-started",children:"Getting Started"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#installation",children:"Installation"})}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"#usage",children:"Usage"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#run-the-qtrobot-data-assistant-with-demo-data",children:"Run the QTrobot Data Assistant with demo data:"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#run-the-qtrobot-data-assistant-with-your-own-data",children:"Run the QTrobot Data Assistant with your own data:"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#pause-and-resume-the-conversation-with-voice-command",children:"Pause and Resume the conversation with voice command"})}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"#customization",children:"Customization"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#using-a-different-converation-language",children:"Using a different converation language:"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#using-different-document-formats",children:"Using different document formats:"})}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"#customizing-the-qtrobots-role",children:"Customizing the QTrobot's Role"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#why-customizing-the-role-is-interesting",children:"Why Customizing the Role is Interesting"})}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#choosing-a-different-llm-model-for-conversation",children:"Choosing a different LLM model for conversation:"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#enabling-scene-undertanding",children:"Enabling scene undertanding"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#disabling-retrieval-augmented-generation",children:"Disabling Retrieval-Augmented Generation"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#storing-and-restoring-conversations",children:"Storing and restoring conversations"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#command-line-parameters",children:"Command-line parameters"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"#license",children:"License"})}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"features",children:"Features"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Retrieval-Augmented Generation (RAG):"})," Enhances QTrobot's ability to provide accurate and context-aware answers by retrieving relevant information from user-prov
1ided documents in various format such as '.txt' '.pdf', '.docx' and '.md'."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Multilingual Query Support:"})," Allows users to query their data in a different language than the one used in the provided document. Indpended from the in which language the documents data are, users can ask questions regarding their data in more than 14 languages."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Offline Large Language Models (LLM):"})," Enables QTrobot to generate human-like text and engage in meaningful conversations using state-of-the art llms such as Meta LLama3.1, Google gemma2, Microsoft Phi3 and Mistral."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Offline Scene Undertanding (VLM):"})," Uses Visual Large Language Models (VLM) to interpret visual inputs from camera stream. QTrobot can analyze scenes, recognize objects, and infer context, enabling it to provide responses based on visual cues."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Multi-User Interaction"}),": QTrobot recognizes and remembers users by their faces, personalizing interactions. It tracks individual preferences, recalls past conversations, and adapts to each user's needs for seamless engagement."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Human Tracking:"})," Tracks the user's face and voice during interactions to make conversations feel more natural and engaging."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"On-Device Processing:"})," Ensures that all data processing occurs locally on QTrobot, protecting user privacy and maintaining security."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"technologies-used",children:"Technologies Used"}),"\n",(0,a.jsx)(n.p,{children:"Following is an overview of the key technologies and packages employed to implement each feature of the QTrobot Data Assistant. These tools were chosen to ensure robust performance, privacy, and seamless interaction in all user scenarios."}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Offline Large Language Model (LLM):"})," ",(0,a.jsx)(n.a,{href:"https://llama.meta.com/",children:(0,a.jsx)(n.strong,{children:"Llama 3.1"})})," via ",(0,a.jsx)(n.a,{href:"https://ollama.com/",children:(0,a.jsx)(n.strong,{children:"Ollama"})})," Framework.\nOllama is a framework designed to simplify the deployment and usage of large language models like Llama 3.1 in local environments. Ollama also supports advanced features like tool calling, enabling models to interact with external tools, APIs, and services, thus expanding their functionality beyond text generation. Llama 3.1 is a state-of-the-art open-source language model developed by Meta, renowned for its superior natural language processing capabilities. It supports multilingual applications, offers extended context handling of up to 128K tokens with very fast response time."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Offline Scene Undertanding (VLM):"})," ",(0,a.jsx)(n.a,{href:"https://moondream.ai/",children:"Moondream"})," is a compact, highly efficient Vision-Language Model (VLM) designed to interpret visual data such as images and video streams. It is particularly adept at tasks like image captioning, object recognition, and answering questions about visual content, providing fast responses. This makes it ideal for applications such as robotics where real-time visual understanding is essential."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Automatic Speech Recognition (ASR):"})," ",(0,a.jsx)(n.a,{href:"https://docs.nvidia.com/deeplearning/riva/user-guide/docs/asr/asr-overview.html",children:"Nvidia RIVA ASR"}),". RIVA is an advanced offline automatic speech recognition engine optimized for high accuracy and low latency. It efficiently converts spoken language into text, making it ideal for real-time applications like interactive conversations. Riva supports multiple langueges such as English, Spanish, French, Ital
1ian and more. Check the ",(0,a.jsx)(n.a,{href:"https://docs.nvidia.com/deeplearning/riva/user-guide/docs/asr/asr-overview.html#pretrained-asr-models",children:"supported languges here"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Retrieval-Augmented Generation (RAG):"})," ",(0,a.jsx)(n.a,{href:"https://www.llamaindex.ai/",children:"LlamaIndex Data Framework"}),". LlamaIndex enables Retrieval-Augmented Generation (RAG) by combining the strengths of data retrieval with text generation. This approach ensures that QTrobot can generate contextually relevant and accurate responses based on user-provided documents. The framework is scalable and flexible, handling large datasets efficiently and adapting to various formats of data inputs."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Multi-user Tracking and Interaction:"})," ",(0,a.jsx)(n.a,{href:"https://pypi.org/project/deepface/",children:"DeepFace"})," is a lightweight Python library that offers robust face recognition and analysis capabilities, used by QTrobot to track and maintain focus on the user's face during interactions. This enhances the naturalness and engagement of conversations by allowing QTrobot to respond accurately in real-time. it is a hybrid face recognition framework wrapping state-of-the-art models such as VGG-Face, FaceNet, OpenFace, DeepFace, DeepID, ArcFace, Dlib, SFace and more."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Text-to-Speech (TTS):"})," QTrobot default TTS SDK using Acapela. The QTrobot TTS SDK converts text into natural, human-like speech. With support for a wide array of voices and languages, it enhances the interactivity and accessibility of QTrobot across different regions and languages."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"On-Device Processing:"})," ",(0,a.jsx)(n.a,{href:"https://luxai.com/humanoid-social-robot-for-research-and-teaching/",children:"QTrobotAI@Edge"}),"'s Nvidia Jetson AGX Orin GPU. It provides the computational power necessary for QTrobot to perform intensive AI tasks directly on the device. This ensures high-performance processing and responsivness of AI models which is crucial for implementing fluent conversation. By processing all data on-device, it enhances data privacy and security, making it a key component of QTrobot's AI-driven operations."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,a.jsx)(n.p,{children:"The QTrobot Data Assistant requires QTrobotAI@Edge and an initial internet connection for installation and setup."}),"\n",(0,a.jsx)(n.h3,{id:"installation",children:"Installation"}),"\n",(0,a.jsx)(n.admonition,{title:"Notice",type:"info",children:(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["The project's source code is available in the ",(0,a.jsx)(n.em,{children:(0,a.jsx)(n.a,{href:"https://github.com/luxai-qtrobot/tutorials/tree/master/demos/qt_ai_data_assistant",children:"LuxAI Tutorials Github Repository"})}),". To get the latest version of the code on your ",(0,a.jsx)(n.strong,{children:"QTPC"})," (Nvidia Jetson): ",(0,a.jsx)(n.code,{children:"cd ~/robot/code/tutorials/; git pull"})]}),"\n",(0,a.jsxs)(n.li,{children:["Ensure that ",(0,a.jsx)(n.em,{children:"software"})," repository on ",(0,a.jsx)(n.strong,{children:"QTPC"})," is updated and service files for ",(0,a.jsx)(n.code,{children:"qt_respeaker_app"})," is installed in your catkin workspace:","\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"cd ~/robot/code/software/; git pull"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"cd ~/catkin_ws/; ln -s ~/robot/code/software/headers/qt_respeaker_app/ ./src"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"cd ~/catkin_ws/; catkin_make"})}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["Throughout this documentation, we will refer to ",(0,a.jsx)(n.em,{children:'"~/robot/code/tutorials/demos/qt_ai_data_assistant"'})," as ",(0,a.jsx)(n.em,{children:'"qt_ai_data_assistant"'}),"."]}),"\n"]})}),"\n",(0,a.jsxs)(n.p,{children:["The installation process involves three main steps: ",(0,a.jsx)(n.em,{children:(0,a.jsx)(n.strong,{children:"(1) Installing Nvidia Riva ASR"})}),", ",(0,a.jsx)(n.em,{children:(0,a.jsx)(n.strong,{children:"(2) Installing Ollama and required models"})})," and ",(0,a.jsx)(n.em,{children:(0,a.jsx)(n.strong,{children:"(3) Installing python packages"})})]}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Install Nvidia Riva ASR:"})}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Sign in to your ",(0,a.jsx)(n.a,{href:"https://ngc.nvidia.com/signin",children:"Nvidia NGC"})," portal (sign up if you don't have an account)."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Follow the instructions for ",(0,a.jsx)(n.a,{href:"https://docs.nvidia.com/ngc/gpu-cloud/ngc-user-guide/index.html#generating-api-key",children:"Generating Your NGC API Key"})," to obtain an API key."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Use your API key to log in to the NGC registry by entering the following command and following the prompts."}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Note:"})," The ",(0,a.jsx)(n.code,{children:"ngc"})," CLI is already installed on the QTrobot, so no need to install it."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"ngc config set\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Download the Embedded Riva start scripts to the ",(0,a.jsx)(n.code,{children:"~/robot"})," folder using the following command:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd ~/robot/ \nngc registry resource download-version nvidia/riva/riva_quickstart_arm64:2.14.0\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Modify ",(0,a.jsx)(n.code,{children:"~/robot/riva_quickstart_arm64_v2.14.0/config.sh"})," to disable unnecessary services, keeping only ",(0,a.jsx)(n.code,{children:"service_enabled_asr"})," enabled. The relevant part of ",(0,a.jsx)(n.code,{children:"config.sh"})," should look like this:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# ...\n# Enable or Disable Riva Services\nservice_enabled_asr=true\nservice_enabled_nlp=false\nservice_enabled_tts=false\nservice_enabled_nmt=false\n# ...\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Update the ",(0,a.jsx)(n.code,{children:"~/robot/riva_quickstart_arm64_v2.14.0/riva_init.sh"})," script to resolve the Nvidia NGC CLI version issue by changing the version from ",(0,a.jsx)(n.code,{children:"3.26.0"})," to ",(0,a.jsx)(n.code,{children:"3.63.0"}),". Replace the URL on line 170 with:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:" # Original line:\n # https://api.ngc.nvidia.com/v2/resources/nvidia/ngc-apps/ngc_cli/versions/3.26.0/files/ngccli_arm64.zip\n\n # Updated line:\n https://api.ngc.nvidia.com/v2/resources/nvidia/ngc-apps/ngc_cli/versions/3.63.0/files/ngccli_arm64.zip\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Initialize the Riva ASR container. This may take around 30 minutes, depending on your internet speed."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd ~/robot/riva_quickstart_arm64_v2.14.0\nbash ./riva_init.sh\n"})}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Install ollama and pull the required models:"})}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["We have prepared a script (",(0,a.jsx)(n.code,{children:"install_ollama.sh"}),") to download and install the appropriate version of ollama on QTrobot's Jetson AGX Orin. To install Ollama, execute the following command:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd qt_ai_data_assistant\
1nsudo bash ./scripts/install_ollama.sh\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Next, download the required models. These models are approximately 6 GB in size, so the download may take some time. If the download process is interrupted, simply rerun the command to resume."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"ollama pull llama3.1:latest\nollama pull mxbai-embed-large:latest\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Verify that all the required models have been downloaded correctly by using the ",(0,a.jsx)(n.code,{children:"ollama list"})," command. The output should look similar to the following:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"NAME \tID \tSIZE \tMODIFIED \nmxbai-embed-large:latest\t468836162de7\t669 MB\t3 minutes ago\nllama3.1:latest \tf66fc8dc39ea\t4.7 GB\t10 minutes ago\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Test the llama3.1 model from the command line using the following command. Please note that it may take some time for Ollama to load the model for the first time. If Ollama fails with a timeout message during the initial load, simply rerun the command. Subsequent model loads will be much faster.:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-tex",children:'$ ollama run llama3.1\n>>> who are you?\nI\'m an artificial intelligence model known as Llama. Llama stands for "Large Language Model Meta AI."\n>>> Send a message (/? for help)\n'})}),"\n",(0,a.jsxs)(n.p,{children:["To exit the chat, press ",(0,a.jsx)(n.code,{children:"ctrl+c"})," or type ",(0,a.jsx)(n.code,{children:"/bye"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Install required python packages:"})}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Create a python3 virtual environment and install pip packages:","\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd qt_ai_data_assitant\npython3 -m venv venv\nsource venv/bin/activate \npip install --upgrade pip\npip install -r requirements.txt\n"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"usage",children:"Usage"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.em,{children:(0,a.jsx)(n.strong,{children:"Note:"})}),": ",(0,a.jsx)(n.em,{children:"An internet connection is required the first time you run the QTrobot Data Assistant to download the necessary models, including NLTK, RetinaFace, and VGG-Face."})]}),"\n",(0,a.jsx)(n.p,{children:"First, ensure that the Riva ASR Docker service is running. If Riva is not active, it may take 1 to 2 minutes to initialize."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd ~/robot/riva_quickstart_arm64_v2.14.0\nbash ./riva_start.sh ./config.sh -s\n"})}),"\n",(0,a.jsx)(n.h4,{id:"run-the-qtrobot-data-assistant-with-demo-data",children:"Run the QTrobot Data Assistant with demo data:"}),"\n",(0,a.jsx)(n.p,{children:"The repository includes a demo PDF file detailing the QTrobot research variants and specifications. To run the project with this demo document:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd qt_ai_data_assistant\nsource venv/bin/activate\npython src/qt_ai_data_assistant.py\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Wait a few seconds for the script to initialize and load the document. Once it's ready, you can begin conversing with the QTrobot. For example, you might ask, ",(0,a.jsx)(n.em,{children:'"What are all your variants?"'})," or ",(0,a.jsx)(n.em,{children:'"How can I program QTrobot?"'})," You can also ask questions unrelated to the document, such as, ",(0,a.jsx)(n.em,{children:'"What are the official languages of Luxembourg?"'})]}),"\n",(0,a.jsx)(n.h4,{id:"run-the-qtrobot-data-assistant-with-your-own-data",children:"Run the QTrobot Data Assistant with your own data:"}),"\n",(0,a.jsx)(n.p,{children:"To run the QTrobot Data Assistant with your own data, first create a folder to store your documents:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"mkdir ~/Documents/qt-
1assistant-data\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Copy your PDF file(s) into your project's document folder (",(0,a.jsx)(n.code,{children:"~/Documents/qt-assistant-data"}),"). For example, you can use one of your research papers. Then, simply start the ",(0,a.jsx)(n.code,{children:"qt_ai_data_assistant.py"})," script and provide the path to your document folder."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd qt_ai_data_assistant\nsource venv/bin/activate\npython src/qt_ai_data_assistant.py -d ~/Documents/qt-assistant-data\n"})}),"\n",(0,a.jsx)(n.p,{children:"Wait a few seconds for the script to initialize and load the document. Once it's ready, you can ask questions about the content of your PDF."}),"\n",(0,a.jsx)(n.h4,{id:"pause-and-resume-the-conversation-with-voice-command",children:"Pause and Resume the conversation with voice command"}),"\n",(0,a.jsx)(n.p,{children:"You can ask QTrobot to pause the conversation and remain unresponsive until explicitly instructed to resume. This can be done through natural language commands:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["To pause the conversation, simply say: ",(0,a.jsx)(n.em,{children:'"Hold on for a minute"'})," or ",(0,a.jsx)(n.em,{children:'"Stay silent."'})]}),"\n",(0,a.jsxs)(n.li,{children:["To resume the conversation, explicitly say: ",(0,a.jsx)(n.em,{children:'"Restart the conversation"'})," or ",(0,a.jsx)(n.em,{children:'"Let\'s talk."'})]}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"customization",children:"Customization"}),"\n",(0,a.jsx)(n.p,{children:"You can customize the demo project in various ways to suit your needs:"}),"\n",(0,a.jsx)(n.h4,{id:"using-a-different-converation-language",children:"Using a different converation language:"}),"\n",(0,a.jsx)(n.p,{children:"QTrobot Data Assistant allows users to query their data in a language different from the one used in the provided document. To do this, you must enable your desired language in your Riva ASR installation and ensure that the corresponding language is also configured for QTrobot's Text-to-Speech (TTS) system."}),"\n",(0,a.jsxs)(n.p,{children:["Riva ASR supports a variety of languages including English, German, French, Italian and many more. Check the ",(0,a.jsx)(n.a,{href:"https://docs.nvidia.com/deeplearning/riva/user-guide/docs/asr/asr-overview.html#pretrained-asr-models",children:"Riva ASR supported languges"})," for complete list."]}),"\n",(0,a.jsxs)(n.p,{children:["To enable a specific language in Riva ASR, you need to modify the ",(0,a.jsx)(n.code,{children:"~/robot/riva_quickstart_arm64_v2.14.0/config.sh"})," file to add your language code and then re-initialize Riva ASR. For example, to enable French (fr-FR), modify the ",(0,a.jsx)(n.code,{children:"asr_language_code"})," parameter to include ",(0,a.jsx)(n.code,{children:"fr-FR"}),":"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'# For multiple languages enter space separated language codes.\nasr_language_code=("en-US" "fr-FR")\n'})}),"\n",(0,a.jsx)(n.p,{children:"Next, stop the currently running instance of Riva and re-initialize the service:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd ~/robot/riva_quickstart_arm64_v2.14.0\nbash ./riva_stop.sh\nbash ./riva_init.sh\n"})}),"\n",(0,a.jsx)(n.p,{children:"Then restart the Riva ASR:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd ~/robot/riva_quickstart_arm64_v2.14.0\nbash ./riva_start.sh ./config.sh -s\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Once Riva ASR is running, you can start the ",(0,a.jsx)(n.code,{children:"qt_ai_data_assistant.py"})," script and provide the conversation language code:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd qt_ai_data_assistant\nsource venv/bin/activate\npython src/qt_ai_data_assistant.py --lang fr-FR\n"})}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"--lang <lang code>"})," parameter sets both the ASR and TTS languages to the specified language."]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.em,{children:(0,a.jsx)(n.strong,{children:"Note:"})})," ",(0,a.jsxs)(n.em,{children:["If the TTS language is not installed on your QTrobot, please contact ",(0,a.jsx)(n.a,{href:"malito:[email protected]",children:"[email protected]"})," to obtain the necessary language files."]})]}),"\n",(0,a.jsx)(n.h4,{id:"using-different-document-formats",children:"Using different document formats:"}),"\n",(0,a.jsxs)(n.p,{children:["By default QTrobot Data Assistant loads PDF (",(0,a.jsx)(n.code,{children:".pdf"}),") documents from the specified directory. It uses the ",(0,a.jsx)(n.a,{href:"https://www.llamaindex.ai/",children:"LlamaIndex Data Framework"}
1)," to support various document formats such as ",(0,a.jsx)(n.code,{children:".txt"}),", ",(0,a.jsx)(n.code,{children:".docx"})," and ",(0,a.jsx)(n.code,{children:".md"}),". You can specify the document formats and the maximum number of files to load using the appropriate parameters."]}),"\n",(0,a.jsxs)(n.p,{children:["For example, to load a maximum of 5 PDF and DOCX files from ",(0,a.jsx)(n.code,{children:"~/Documents/qt-assistant-data"}),", use the following commands:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd qt_ai_data_assistant\nsource venv/bin/activate\npython src/qt_ai_data_assistant.py --formats .pdf .docx --max-docs 5\n"})}),"\n",(0,a.jsx)(n.h4,{id:"customizing-the-qtrobots-role",children:"Customizing the QTrobot's Role"}),"\n",(0,a.jsx)(n.p,{children:"You can customize the role and behavior of QTrobot by modifying the system role in the LLM prompts. This allows you to adapt QTrobot to different scenarios, making it a versatile assistant tailored to specific tasks or environments. By changing the system role, you can guide how QTrobot responds, behaves, and interacts with users."}),"\n",(0,a.jsx)(n.h5,{id:"why-customizing-the-role-is-interesting",children:"Why Customizing the Role is Interesting"}),"\n",(0,a.jsx)(n.p,{children:"Customizing the system role allows you to adapt QTrobot to a wide range of applications beyond its default educational and research-focused roles. Whether you need QTrobot to act as a receptionist, a healthcare assistant, a tourist guide, or any other role, this flexibility makes QTrobot a powerful tool in various environments. By fine-tuning the system role, you can ensure that QTrobot meets the specific needs of your users, providing a more personalized and effective experience. Additionally, by leveraging Retrieval-Augmented Generation (RAG), QTrobot can provide highly relevant and contextual responses based on user-provided documents and data, enhancing its utility in specialized roles."}),"\n",(0,a.jsxs)(n.p,{children:["The default system role is defined in the ",(0,a.jsx)(n.code,{children:"llm_prompts.py"})," file:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:"ConversationPrompt = {\n 'system_role': ''' \n You are a humanoid social robot assistant named \"QTrobot\". You can hear and talk. You are designed to support various use cases such as as human-robot interaction research and teaching.\n\n Follow these guidelines when answering questions:\n - Always respond in one or two brief sentences. Keep your sentences as short as possible.\n ... \n '''\n}\n"})}),"\n",(0,a.jsxs)(n.p,{children:["To modify QTrobot\u2019s role, you can edit the relevant part of ",(0,a.jsx)(n.code,{children:"system_role"})," section in the ",(0,a.jsx)(n.code,{children:"llm_prompts.py"})," file. By changing the system role, you can assign QTrobot a new identity and set of behaviors. Here are some examples of how you might customize QTrobot's role, emphasizing its ability to use Retrieval-Augmented Generation (RAG) to provide insightful responses based on user-provided data:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Example 1: Receptionist"})}),"\n",(0,a.jsx)(n.p,{children:"Transform QTrobot into a virtual receptionist who can greet visitors, provide information, and answer queries based on company documents or FAQs:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:"ConversationPrompt = {\n 'system_role': ''' \n You are a receptionist named \"QTrobot\". Your job is to greet visitors, answer their questions, and provide information based on the company\u2019s documents.\n\n Follow these guidelines when answering questions:\n - Always respond in one or two brief sentences. Keep your sentences as short as possible.\n ... \n '''\n}\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Example 2: Tourist Guide"})}),"\n",(0,a.jsx)(n.p,{children:"QTrobot can act as a virtual tourist guide, offering information about local attractions, history, and travel tips by pulling data from guidebooks, maps, and other resources"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:"ConversationPrompt = {\n 'system_role': ''' \n You are a tourist guide named \"QTrobot\". Your role is to provide tourists with information about local attractions, history, and travel tips based on guidebooks and other documents.\n\n Follow these guidelines when answering questions:\n - Always respond in one or tw
1o brief sentences. Keep your sentences as short as possible.\n ... \n '''\n}\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Example 3: Research Conference Center Assistant"})}),"\n",(0,a.jsx)(n.p,{children:"Transform QTrobot into a virtual conference assistant that helps attendees navigate the event, find sessions, and get information about workshops and presentations:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:"ConversationPrompt = {\n 'system_role': ''' \n You are a conference assistant named \"QTrobot\" at a research conference center. Your role is to assist attendees by providing information about the venue, schedule, workshops, and research presentation sessions. \n Provide clear and concise information about the conference schedule, including session times and locations only from the provided documents.\n Use a polite and professional tone.\n\n Follow these guidelines when answering questions:\n - Always respond in one or two brief sentences. Keep your sentences as short as possible.\n ... \n '''\n}\n"})}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"choosing-a-different-llm-model-for-conversation",children:"Choosing a different LLM model for conversation:"}),"\n",(0,a.jsxs)(n.p,{children:["By default, QTrobot Data Assistant uses the ",(0,a.jsx)(n.a,{href:"https://llama.meta.com/",children:(0,a.jsx)(n.strong,{children:"Mata Llama 3.1"})})," llm for conversation. However, you can experiment with different LLMs, such as ",(0,a.jsx)(n.a,{href:"https://blog.google/technology/developers/google-gemma-2/",children:"Google Gemma2"})," to explore varying conversational styles, performance, or domain-specific knowledge. You can experiment with these models via the Ollama interface. To use a different model, first pull the model using the Ollama command:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"ollama pull gemma2 \n"})}),"\n",(0,a.jsxs)(n.p,{children:["Next, start the ",(0,a.jsx)(n.code,{children:"qt_ai_data_assistant.py"})," script and specify the LLM model as a parameter:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd qt_ai_data_assistant\nsource venv/bin/activate\npython src/qt_ai_data_assistant.py --llm gemma2\n"})}),"\n",(0,a.jsx)(n.h4,{id:"enabling-scene-undertanding",children:"Enabling scene undertanding:"}),"\n",(0,a.jsxs)(n.p,{children:["QTrobot uses the ",(0,a.jsx)(n.a,{href:"https://moondream.ai",children:"moondream"})," Visual Language Model (VLM) to analyze scenes, recognize objects, and infer context, allowing it to provide responses based on visual cues. By default, this feature is not enabled. Follow these steps to enable scene understanding and converse with QTrobot about what it sees through its camera feed."]}),"\n",(0,a.jsx)(n.p,{children:"First, pull the Moondream model using the Ollama command. The model is approximately 1.7GB, so downloading may take some time:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"ollama pull moondream \n"})}),"\n",(0,a.jsxs)(n.p,{children:["Next, start the ",(0,a.jsx)(n.code,{children:"qt_ai_data_assistant.py"})," script and enable scene understanding with the following parameter:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd qt_ai_data_assistant\nsource venv/bin/activate\npython src/qt_ai_data_assistant.py --enable-scene\n"})}),"\n",(0,a.jsxs)(n.p,{children:["When enabled, the ",(0,a.jsx)(n.code,{children:"SceneDetection"})," module will periodically query the VLM (by default every 10 seconds) and use the scene description as additional context for the LLM. After enabling the scene feature in ",(0,a.jsx)(n.code,{children:"qt_ai_data_assistant.py"}),", wait for a short time and then start interacting with QTrobot. You can ask questions like, ",(0,a.jsx)(n.em,{children:'"Tell me what you see,"'})," or ",(0,a.jsx)(n.em,{children:'"How many people do you see now?"'})]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.em,{children:(0,a.jsx)(n.strong,{children:"Note:"})})," ",(0,a.jsx)(n.em,{children:"Enabling scene understanding may introduce a slight delay in QTrobot's response time due to increased GPU usage and inference time required by Ollama during LLM and VLM processing at the same time"})]}),"\n",(0,a.jsx)(n.h4,{id:"disabling-retrieval-augmented-generation",children:"Disabling Retrieval-Augmented Generation:"}
1),"\n",(0,a.jsx)(n.p,{children:"In some cases, you may not need to use the Retrieval-Augmented Generation (RAG) feature, especially if the application does not require any user-provided documents or knowledge. Disabling RAG allows QTrobot to interact directly with the LLM for faster, more fluent conversations, as it reduces the processing overhead and latency associated with retrieving and integrating external data."}),"\n",(0,a.jsxs)(n.p,{children:["To disable RAG, simply start the qt_ai_data_assistant.py script with the ",(0,a.jsx)(n.code,{children:"--disable-rag"})," parameter:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd qt_ai_data_assistant\nsource venv/bin/activate\npython src/qt_ai_data_assistant.py --disable-rag\n"})}),"\n",(0,a.jsxs)(n.p,{children:["When RAG is disabled, QTrobot will no longer retrieve information from documents or external sources, and all responses will be generated directly by the LLM based on the content provided in the ",(0,a.jsx)(n.code,{children:"system_role"}),". This can improve response times and is ideal when external knowledge retrieval is not needed for your use case."]}),"\n",(0,a.jsx)(n.h4,{id:"storing-and-restoring-conversations",children:"Storing and restoring conversations"}),"\n",(0,a.jsxs)(n.p,{children:["To save the entire conversation and restore it later, simply run the ",(0,a.jsx)(n.code,{children:"qt_ai_data_assistant.py"})," script and specify the path to the JSON file where the conversation memory will be stored."]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"If the JSON file already exists, the conversation memory will be loaded from it at the start."}),"\n",(0,a.jsx)(n.li,{children:"If the file does not exist, a new one will be created to store the conversation."}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"Example usage:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"python qt_ai_data_assistant.py --mem-store ~/chat_store.json\n"})}),"\n",(0,a.jsx)(n.h4,{id:"command-line-parameters",children:"Command-line parameters"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"python qt_ai_data_assistant.py --help\n\nusage: qt_ai_data_assistant.py [-h] [-d DOCS] [--formats FORMATS [FORMATS ...]] [--max-docs MAX_DOCS] [--lang LANG] [--llm LLM] [--mem-store MEM_STORE] [--enable-scene] [--disable-rag]\n\noptional arguments:\n -h, --help show this help message and exit\n -d DOCS, --docs DOCS Path to the folder containg documents to load\n --formats FORMATS [FORMATS ...]\n document formats ('.txt' '.pdf', '.docx', '.md').\n --max-docs MAX_DOCS maximum number of docuemnt files load\n --lang LANG Conversation language (ar-AR, en-US, en-GB, de-DE, es-ES, es-US, fr-FR, hi-IN, it-IT, ja-JP, ru-RU, ko-KR, pt-BR, zh-CN)\n --llm LLM LLM model to use. default is llama3.1.\n --mem-store MEM_STORE\n path to a json file (e.g. ./chat_store.json) to store the and restore the conversation memeory\n --enable-scene Enables camera feed scene processing\n --disable-rag Disable Retrieval-Augmented Generation\n\nexample: qt_ai_data_assitant.py -d ~/my-docuemnts --formats .pdf .docx --max-docs 3 --lang en-US\n"})}),"\n",(0,a.jsx)(n.h4,{id:"qtrobot-data-assistant---web-ui-access",children:"QTrobot Data Assistant - Web UI Access"}),"\n",(0,a.jsxs)(n.p,{children:["The QTrobot Data Assistant utilizes the ",(0,a.jsx)(n.a,{href:"https://github.com/luxai-qtrobot/paramify#readme",children:"Paramify"})," module to provide a web-based interface for modifying runtime parameters."]}),"\n",(0,a.jsx)(n.p,{children:"Through this interface, you can easily change of the paramaters such as setting language, or pausing and resuming the conversation, among other adjustments."}),"\n",(0,a.jsx)(n.p,{children:"To access the Web UI:"}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsx)(n.li,{children:"Open a web browser on the QTPC."}),"\n",(0,a.jsxs)(n.li,{children:["Navigate to ",(0,a.jsx)(n.a,{href:"http://127.0.0.1:6060/",children:"http://127.0.0.1:6060"}),"."]}),"\n"]}),"\n",(0,a.jsx)("center",{children:(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"QT AI Data Assistant Web UI",src:s(7435).A+"",width:"615",height:"481"})})}),"\n",(0,a.jsx)(n.h2,{id:"license",children:"License"}),"\n",(0,a.jsxs)(n.p,{children:["This project is licensed under the MIT License. See the ",(0,a.jsx)(n.a,{href:"https://github.com/luxai-qtrobot/tutorials/blob/master/demos/qt_ai_data_assistant/LICENSE",children:"LICENSE"})," file for details."]}),"\n",(0,a.jsx)(n.h3,{id:"copyright",children:"Copyright"}),"\n",(0,a.jsx)(n.p,{children:"\xa9 2024 LuxAI S.A. All rights reserved."})]})}function u(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},93058:(e,n,s)=>{s.d(n,{A:()=>a});const a=s.p+"assets/images/multi_lingual-cc2db7bc15983da1b12149530be2db9f.jpg"},41060:(e,n,s)=>{s.d(n,{A:()=>a});const a=s.p+"assets/images/multi_users-f1b5e1469b57ad2b007345d15b295650.jpg"},25257:(e,n,s)=>{s.d(n,{A:()=>a});const a=s.p+"assets/images/scene_understanding-e6295be26e142ef11ed2a07f700b34c4.jpg"},7435:(e,n,s)=>{s.d(n,{A:()=>a});const a=s.p+"assets/images/web_ui-3a235656fe90d73559bbe86695afeac3.png"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.