I will plan to do a step by video series of how to set this up and run it over on Youtube https://www.youtube.com/@AI_by_AI_007/videos In the meantime here are the steps:
- Do you have an Nvidia GPU? Make sure your Nvidia Drivers are set up
- Install Docker
- Install Ollama
- https://www.ollama.com
- Setup Video: (https://youtu.be/90ozfdsQOKo)
- Step 1: Clone (or copy) the Repo here to youR project folder
- Step #2: Download and install Node.js if you have not already done so
- Step #3: NPM package installs
- From project folder where you copied the files from Github in step #1
- Open a terminal session in your projeecty folder (Helpful Setup Video: https://youtu.be/P3aKRdUyr0s)
- run this: npm install express
- run this: npm install langchain
- run this: npm install openai (ollama is openai API Compatible)
- Step 4: Optional Sign up for the free Tier D-ID Avatar service
- https://www.d-id.com and get your API key
- Add your d-id api key to the
api.json
file in you prject directory - Run a test to ensure your D-ID api is set correctly
- Test by checking d-id credit balance: Run this: node test_d_id.js
- Step #5: Install ollama https://ollama.com/blog/ollama-is-now-available-as-an-official-docker-image Test your Ollama install https://github.com/ollama/ollama
- Got issues with Ollama? Check this channel -- hands down best Ollama resource: https://www.youtube.com/watch?v=90ozfdsQOKo
- Consult with ChatGPT or your favorite model -- they all know nore then I do :)
- Ask human assistance try Discord as all these packages have servers with helpful people on them D-ID discord: https://discord.gg/Ux6S5mQT Ollama Discord: https://discord.gg/74FzdcnZ
- From you project directory and session where you installed Node and ran npm install express in step #3
- start up the backend server by running node app.js
- You should see this message - server started on port localhost:3001
- (open index.html app) in the browser add http://localhost:3001/index.html
- (connect button) press connect you should see the connection ready fedback on bottom of screen
- The looping Avatar video should play waitig for your question
- Clear all the check boxes and test that you can chat with your Ollama Model only (No check for Did Avatar)
- Now check the box for a voice replay (Still without D-ID check box) to test voice playback
- Once Ollama and you LLM are chatting via text then test voice typing to see if your browser is set up correctly
- Now you are ready to Check the box to send to D-ID (Press the connect button to set up streaming conmnections)
- Input a Chat and the D-ID service will animate the response.
- Be patient and enjoy the puzzle if things are not working right away -- stay with it you will get it!
For help See the Youtube:
https://github.com/jjmlovesgit/BetterLocalOllamaRag-/blob/main/thumb.png