Posts

Showing posts with the label ollama

Offline AI Chatbot - RPi5

Image
  Not heard of Piper before, but have built the rest before - nice setup:

Deepseek 1.5b on an "old-ish" laptop

Image
okay, I admit I wasn't expecting much.  I was surprised.  I have ollama running locally, so I just pulled the 1.5b model down over my 4G connection. The token output was pretty fast, for instance, it was outputting at a rate that I would consider equiv. to getting it from a cloud service.  It was as fast as I could read, just, sometimes it was going faster. My 1 minute experiment was this:  I asked for some javascript code to be written to render a 3D world in a web-browser and to explain what was being done. The first section of the output showed the "reasoning" logic and "arguments" that were going on between the internal workings of the model.  Now, I recall doing this myself about 2years ago when I first built E.L.VIS - long story, won't go into it - but I was asked to "stop" as I was getting to ahead of everyone else, including myself.  As it was me, I not only stopped, I walked away & focused on "other things". Now though, it lo...

Stop pi$$ing around and just use this for all your LLM stuff

Image
Glad I got your attention. Right, I'm assuming you know what LLM is.  I assume you know what RAG is. I assume you know what an AI Agent is. I'm also assuming you're fed up being told that you need to code a solution by hand using Python, Langchain etc... to achieve this, when all you want to do is just use the technology and not have to hand crank every piece of the solution. Well, fear no more.  AnythingLLM is here to save the day.   VISIT the OFFICIAL WEBSITE HERE btw - I have no affiliation with this app or people, I just think it ticks a LOT of boxes, it is simple, efficient & effective - and had I been allowed to continue with the path that I was on 18months ago, I would have made the same thing (about a year ago), but hey-ho, that is not my purpose - but it does mean I appreciate what they've done. What's all the fuss about? Okay, you can install this locally, on your Linux laptop, if you must, your Mac and if you are a real knucklehead, a Windows machine ...

Rotary phone, RPi5, STT & Ollama for an offline quirky assistant with TTS output - part 3

Image
As shown HERE (Part 1) & HERE (Part 2), I've been fiddling around with an old rotary phone, adding some switches and servo and hooking it up to a Raspberry Pi 5 in order to do some Speech to Text processing, some local / offline LLM processing and some Text to Speech output. Well, I've been faffing around with this on & off for a short while and I've now finally got the hardware & the software doing what it needs to do.  It is version 1.0, as in, it is in Python, however I do have it all setup to be able to drop down to C coding and see if that actually makes things faster / more efficient etc.. So, what was the plan? I wanted to take an old rotary phone, attempt to leave the externals as standard as possible, but make it so that a person can pick up the handset, dial a number, "ask a question", put the phone handset back down and then have the phone ring when an answer is ready, the person picks the handset back up and the answer is spoken to the pe...

Rotary phone, RPi5, STT & Ollama for an offline quirky assistant with TTS output - part 2

Image
Okay, following on from the success of Part 1 (okay, it was only about 8 hours ago, but y'know) I ventured into the Hardware side of things, looking at getting the software to interact with the hardware.  Time to get the screwdrivers out. As mentioned, I thought I was going to use Node-Red.  I burnt even more time trying to get Node-Red GPIO nodes to work.  Turns out that there are "issues" with RPi 5, Python and the GPIO access.  It took me far too long going around in circles to accept this.  I'll have a chat with DCJ when he's back from holiday in July. So, what did I do?  I went back to the layer underneath.  Yep, I did it people, I dropped into using Python.  Actually, I noticed that the node-red node was just dropping down to using Python anyway, so I was just removing the layer that was giving me issues. Here's the Node-Red error I was getting: It's odd as I can run that command not a problem and I followed all the instructions for the node...

Rotary phone, RPi5, STT & Ollama for an offline quirky assistant with TTS output - part 1

Image
Did I say, "rotary phone?"  Sure did. "What is one of those?" (top left in photo above) Well, back in the day we had these odd things that we made phone calls from - yep, just phone calls.  People used them to call other people, other people used phones to call them, it had a funky dial to select the numbers and a headset you picked up and put to the side of your head.  It was great. Anyway, I had a funky idea to re-purpose one of these device, hijack the microphone and the speaker of the headset, allow a person to speak a question that they want answered, pass that feed into a Raspberry Pi 5, convert the Speech to Text (using state of the art OpenAI Whisper - yes, OFFLINE!), then pass that into an LLM (powered by Ollama Engine running OFFLINE), then convert the response back to Speech, trigger the phone to basically make it RING! - person picks up the phone and the answer to their question is spoken back to them. Funky huh?  As an implementation pattern it does dem...