Introducing the OpenMindsAI Response Sensor for Home Assistant
I’m thrilled to share with you my latest project, a custom integration that lets you bring the power of MindsDB’s machine learning directly into your Home Assistant setup. With this integration, you can bring OpenAI-driven conversations to your dashboard, and potentially more.
The OpenMindsAI is a Home Assistant sensor that allows you to communicate with MindsDB’s machine learning models for predictions based on your input text.
One of the best things about this integration is that it does not require you to have an OpenAI API key. You can simply use MindsDB’s machine learning models to generate responses to your input text.
Thanks for this. I’m finding LLMs generally of interest at the moment (who isn’t?!) but I’m struggling to see use cases for home automation other than as a coding assistant. Do you have any insights you could share?
Yeah so I will be looking at creating a vector database next, the data being my Home Assistant entity registry, I’ll then pass this data to OpenAI’s embedding model. The goal here will be to allow OpenAI to query my data. As a result, unlock device control via OpenAI.
As for the actual use case, It’s really yet to be discovered. I am just learning as I go, providing you guys with all my findings in the hope that it sparks interest and ideas in the community.
No this component in particular makes use of their cloud platform.
Here, we’re using HTTP API to post requests to our MindsDB cloud instance an retrieve the response.
This can in theory be hosted locally. Here’s their GitHub. This would however require you to bring your own OpenAI API key.
This error originated from a custom integration.
Logger: homeassistant
Source: custom_components/openmindsai/sensor.py:31
Integration: openmindsai (documentation)
First occurred: 7:22:24 AM (3 occurrences)
Last logged: 7:22:37 AM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/openmindsai/sensor.py", line 69, in async_ask
response = await self._hass.async_add_executor_job(ask, self._session_cookie, self._model, new_query)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/openmindsai/sensor.py", line 31, in ask
response_message = response_json[0]["response"]
KeyError: 0
I’m on 2022.11.4. Does this need a specific version to run?
Hi there, thanks very much for this! All is working as it should for me, but responses seem very slow. I think on average it takes about 40 seconds to get a reply. Is that expected?
This utilises mindsDBs free service, which ultimately means we are using a shared computing resource. So it will be slower compared to other premium available options.