Home

Awesome

GitHub Release Downloads Build Status License hacs

Ollama Conversation

The Ollama integration adds a conversation agent powered by Ollama in Home Assistant.

This conversation agent is unable to control your house. The Ollama conversation agent can be used in automations, but not as a sentence trigger. It can only query information that has been provided by Home Assistant. To be able to answer questions about your house, Home Assistant will need to provide Ollama with the details of your house, which include areas, devices and their states.

Installation

To install the Ollama Conversation integration to your Home Assistant instance, use this My button:

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Manual Insallation

If the above My button doesn’t work, you can also perform the following steps manually:

Note:

HACS does not "configure" the integration for you, You must add Ollama Conversation after installing via HACS.

Options

Options for Ollama Conversation can be set via the user interface, by taking the following steps:

General Settings

Settings relating to the integration itself.

OptionDescription
API TimeoutThe maximum amount of time to wait for a response from the API in seconds

System Prompt

The starting text for the AI language model to generate new text from. This text can include information about your Home Assistant instance, devices, and areas and is written using Home Assistant Templating.

Model Configuration

The language model and additional parameters to fine tune the responses.

OptionDescription
ModelThe model used to generate response.
Context SizeSets the size of the context window used to generate the next token.
Maximum TokensThe maximum number of words or “tokens” that the AI model should generate in its completion of the prompt.
Mirostat ModeEnable Mirostat sampling for controlling perplexity.
Mirostat ETAInfluences how quickly the algorithm responds to feedback from the generated text. A lower learning rate will result in slower adjustments, while a higher learning rate will make the algorithm more responsive.
Mirostat TAUControls the balance between coherence and diversity of the output. A lower value will result in more focused and coherent text.
TemperatureThe temperature of the model. A higher value (e.g., 0.95) will lead to more unexpected results, while a lower value (e.g. 0.5) will be more deterministic results.
Repeat PenaltySets how strongly to penalize repetitions. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient.
Top KReduces the probability of generating nonsense. A higher value (e.g. 100) will give more diverse answers, while a lower value (e.g. 10) will be more conservative.
Top PWorks together with top-k. A higher value (e.g., 0.95) will lead to more diverse text, while a lower value (e.g., 0.5) will generate more focused and conservative text.

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines

Discussions

Discussions for this integration over on Home Assistant Community