/groq_deepgram_agent

STT-LLM-TTS (websockets/asynchronous) Agent using Deepgram and Groq LPU's and Bert for Vector Embeddings and Simiarity search for RAG context management

Primary LanguagePython

AI Rag Agent demo

This demo showcases an AI RAG Agent that leverages Text-To-Speech (TTS) and Speech-To-Text (STT) for LLM interactions using Deepgram and Groq LPU's.

BERT LLM to build vector embeddings for the user message and uploaded documents that undergo cosine similarity testing to find the most relevant for LLM context management.

DB connection through SQLAlchemy for documents, transcription sessions, user registration and vector embeddings of the uploaded documents.

The demo is designed to stream STT and TTS to enhance speed.

INSTALLATION macos:

  1. brew install ffmpeg and portaudio
  2. pip install -r requirements.txt

windows powershell:

  1. cd C:
    curl -L -o ffmpeg-release-essentials.zip https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip

  2. Extract the FFmpeg Package: powershell -command "Expand-Archive -Path .\ffmpeg-release-essentials.zip -DestinationPath C:\ffmpeg"

  3. Add FFmpeg to the System PATH: setx /M PATH "%PATH%;C:\ffmpeg\ffmpeg-\bin" ###Replace with the actual version directory inside C:\ffmpeg (e.g., ffmpeg-5.1-essentials_build)###

LAUNCH FLASK WEB APP: python3 app2.py Screen Shot 2024-07-27 at 5 50 48

Toggle the sidebar for the AI RAG AGENT Screen Shot 2024-07-27 at 5 52 13

Screen Shot 2024-06-14 at 1 39 37

CLI: python3 Quickagent.py