#Ollama Conversations

1 messages · Page 1 of 1 (latest)

compact jackal
#

Just started playing with ollama and quite excited.. finally got it integrated. The catch is how to actually use it? .. I am using a 'Tools' model but I seem just to get text. Is this expected?

coarse reef
#

Is the ollama conversation agent set to allow assist? Looks like it is trying to call a tool but unable.

compact jackal
#

yes it is set to assist.. if TOOL is disabled, you get an 'Info' message on the top of the Asist window

compact jackal
#

If I disable assist, I get an info message. I have no idea why its in French? (My Install is English)

coarse reef
#

Likely, the way this model handles tools may be incompatible with how HA expects the tool call structures to be :/

cinder otter
#

also you may want to install open-webui

#

v

#

I just use the docker container.

coarse reef
#

I run both of these 🙂

cinder otter
#

My home assistant voice is not recognizing any commands? even when i type them in?

#

Trying to pick up one of the exposed entities, with no luck

#

Run
done
Pipeline
01hgrnj0nxagwm4p3wzq7bpkpr
Language
en
Download Speed.Sorry, I couldn't understand that
Natural Language Processing
0.14s ✅
Engine
conversation.home_assistant
Language
en
Input
Download Speed.
Response type
error
Error code
no_intent_match

#

i have an alias called Download Speed

#

All i get is "Sorry, I couldn't understand that" not sure what is going on?

#

i must have missed something?

coarse reef
#

You have an alias, but what are you trying to do here? HA doesn't recognize just an alias, it needs to match with an intent. Also is this alias/entity exposed to assist?

#

Also this room is related to Ollama, you may want to open a new topic.

cinder otter
#

I got it figured out, i am using ollama to handle my voice command and do the query after receiving the command. I had to build add a ollama intergration and then build the voice assistant with the olllama model

#

it actually works really well

#

the voice will pick up on the alias, and makes it easy to get it into the exposed entities

#

Although i would like to have an option that if the voice command does not find anything in HA then it will default to an answer from the LLM, so it can answer other questions.

#

Has anyone figure that out.

coarse reef
#

if you are using ai conversation agent I think it may do that already?

cinder otter
#

i have not got it work, yeah i have that one but it just seems to interact with the HA, nothing else

#

Maybe I do not have it configured correctly.

#

Running this with the WIllow WIS, which works really nicely.

coarse reef
#

HA has an ollama conversation integration as part of core

#

but then you need to set your assist pipeline to use that agent instead of the default Home Assistant agent

cinder otter
#

OK I willl look at those.

#

that....

#

I have the included one set up, but not sure what to change in the pipeline. Any suggestions for reading material?

#

current pipline has a bunch of "if" statements in it.

#

@coarse reef not sure how to update/change the pipeline.

#

do you have an example of a working pipeline?

coarse reef
#

Settings > Voice Assistants

cinder otter
#

{%- set used_domains = set([
"binary_sensor",
"climate",
"cover",
"fan",
"light",
"lock",
"sensor",
"switch",
"weather",
]) %}
{%- set used_attributes = set([
"temperature",
"current_temperature",
"temperature_unit",
"brightness",
"humidity",
"unit_of_measurement",
"device_class",
"current_position",
"percentage",
]) %}

This smart home is controlled by Home Assistant.
The current time is {{ now().strftime("%X") }}.
Today's date is {{ now().strftime("%x") }}.

An overview of the areas and the devices in this smart home:

{%- for entity in exposed_entities: %}
{%- if entity.domain not in used_domains: %}
  {%- continue %}
{%- endif %}

- domain: {{ entity.domain }}
{%- if entity.names | length == 1: %}
  name: {{ entity.names[0] }}
{%- else: %}
  names:
{%- for name in entity.names: %}
  - {{ name }}
{%- endfor %}
{%- endif %}
{%- if entity.area_names | length == 1: %}
  area: {{ entity.area_names[0] }}
{%- elif entity.area_names: %}
  areas:
{%- for area_name in entity.area_names: %}
  - {{ area_name }}
{%- endfor %}
{%- endif %}
  state: {{ entity.state.state }}
  {%- set attributes_key_printed = False %}
{%- for attr_name, attr_value in entity.state.attributes.items(): %}
    {%- if attr_name in used_attributes: %}
    {%- if not attributes_key_printed: %}
  attributes:
    {%- set attributes_key_printed = True %}
    {%- endif %}
    {{ attr_name }}: {{ attr_value }}
    {%- endif %}
{%- endfor %}
{%- endfor %}

Answer the user's questions using the information about this smart home.
Keep your answers brief and do not apologize.

#

this is what i was asking about... this only answers questions aobut HA

#

it kicks out any other questions.

coarse reef
#

Not sure if you are running something different or custom, with the stock HA config mine works for both home control and general queries:

#

Some of those are additions I added, but the first two lines are the stock Home Assistant prompt.

cinder otter
#

I am defiantly running something else, i will have to reconfigure it.

cinder otter
#

That plug in only works with OpenAI

coarse reef
#

there is an ollama one

cinder otter
#

@coarse reef I just had to tweak some things in the config for it, added "Also, answer any questions not related to HomeAssistant."