this post was submitted on 05 Apr 2025
46 points (97.9% liked)

LocalLLaMA

2878 readers
34 users here now

Welcome to LocalLLaMA! Here we discuss running and developing machine learning models at home. Lets explore cutting edge open source neural network technology together.

Get support from the community! Ask questions, share prompts, discuss benchmarks, get hyped at the latest and greatest model releases! Enjoy talking about our awesome hobby.

As ambassadors of the self-hosting machine learning community, we strive to support each other and share our enthusiasm in a positive constructive way.

founded 2 years ago
MODERATORS
 

So far I have tried to get it to read me my shoping list, turn on my desklight, and tell me how many hours until sundown. It wasn't able to do any of those things. I'm using llama3.1:8b. I have a 3080 12gb. I also tried mixtral:8x7b but it just says "unexpected intent error".

top 14 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 2 weeks ago* (last edited 2 weeks ago)

Hi! So heres the rundown.

You are going to need to be willing to learn how computer program services send text messages to eachother over open ports, how to call on a API in a programming script, and slowly piece together how to work with ollamas external API calling tool functions. Heres the documentation

Essentially you need to

  1. learn how ollama external API works. How to send it text data using a basic program in python on an open port and recieve data back to put into a text file.

  2. learn how to make that python program pull weather and time data from openweather

  3. learn how to feed that weather and time data into ollama on an open port as part of a tool calling function. A tool call is a fancy system prompt that tells the model how to interface with the data in a well defined paratamized way. you say a keyword like get weather, it sends a request to your python program to get data from openweather and sends it back in way the llm is instructed to process.

example: https://medium.com/@ismalinggazein/openai-function-calling-integrating-external-weather-api-6935e5d701d3

Unless you are already a programmer who works with sending and recieving data over the internet to be processed, this is a non-trivial task that requires a lot of experimentation and getting your hands dirty with ports and coding languages. Im currently getting ready to delve into this myself so I know its all can feel overwhelming. Hope this helps.

[–] [email protected] 1 points 2 weeks ago

What's in the initial prompt for your chats?

[–] [email protected] 5 points 2 weeks ago

I think you’re gonna need to implement function calling in some way. If you add it yourself that’s kinda complicated to implement in a non-annoying way but there must be some assistant frameworks that you can connect with your local LLM instead of an external API

[–] [email protected] 3 points 2 weeks ago

Thanks Ollama.

[–] [email protected] 3 points 2 weeks ago

This query works for me in hass with llama3.2:3b.

[–] [email protected] 3 points 2 weeks ago

Man that almost sounds like Siri. I Can’t help unfortunately. It sounds like it doesn’t realize that the sun sensor data is what you’re looking for, like it doesn’t recognize what the data actually is? If that makes sense. I don’t think the celeron that runs my hass would also run a llm or id give it a shot.

[–] [email protected] 13 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

You may need to give your Assistant some tools.

Things like weather and time require the LLM to be able to fetch external data.

[–] [email protected] 5 points 2 weeks ago (1 children)

Yeah, how does this work? Do I need to setup the tools in home assistant or do I need setup tools with system prompt / modelfile on the ollama server? The ollama integration says the AI instructions use homeassiant templating. Do I need to create a custom template prompt that passes the info to the ollama server in way that works with the tools? https://www.home-assistant.io/docs/configuration/templating/

[–] [email protected] 8 points 2 weeks ago

MY bad, I did not catch this was home assistant... I get the feeling that should be taken care of for you based on this

https://www.home-assistant.io/integrations/ollama/

Sorry to have to tell you... I don't know :(

[–] [email protected] 4 points 2 weeks ago (1 children)

Coming from a somewhat expert in timekeeping, it might help to inform it what your time zone is.

But even with that said, I don't trust AI for anything serious.

[–] [email protected] 2 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

It just has to read me what the Sun Next sensor says. I exposed it in the assist setting and it clearly knows it exits. I think I'm having some issue with the tools but I'm not sure how you're suppose to set it up.

[–] [email protected] 3 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

Wait, it's got a sensor for that, and still can't even figure it out? That sounds stupid to be honest.

Shit, I got a totally ignorant watch that knows the exact phases of the moon, all I gotta do is set the date, time and longitude correctly.

As far as sunrise and sunset, those have been basically precalculated for thousands of years from now into the future, as long as you know your latitude and longitude, and the Earth doesn't decide to flip over or do a backspin.

Good luck, hope you get your home assistant thing sorted out, but fuck AI, it's Actually Ignorant.

[–] [email protected] 6 points 2 weeks ago (1 children)

Well, it's not an actual sensor. The sun "sensor" is built into home assistant and is pre-calculated. It uses the sensor interface to keep things constant when creating custom automation. I could just create a automation that reads it out the when I say a specific phrase. I'm just trying to use ollama so I don't have to create custom automation for everything.

[–] [email protected] 1 points 2 weeks ago

Ah, gotcha.

Sorry that I am not directly familiar with your system, but yeah there's got to be some way to set your earthly coordinates into it..