Create a personality with AI
You can give your voice assistant personality by using an AI conversation agent. Currently, this works with the OpenAI Conversation or the Google Generative AI integration.
For this tutorial, we will work with OpenAI. This requires an OpenAI account. For what we do here, the free trial option is sufficient.
Demos
Interview with an AI Mario personality
Using Assist with AI to control your smart home
An 1-minute clip showing how Assist is using AI to control a smart home.
Prerequisites
This tutorial assumes you have a few things set up already:
-
Home Assistant Cloud
or a manually configured Assist Pipeline
Creating an OpenAI voice assistant personality
Using OpenAI requires an OpenAI account. For this tutorial, the free trial option is sufficient. No need to leave your credit card information.
-
Set up an OpenAI account and install the OpenAI conversation integration.
-
Create a Mario personality.
-
Once you installed the OpenAI Conversation integration, go to Settings > Devices & Services. In the OpenAI Conversation integration, select Configure.
-
In the Prompt template field, enter the following text:
You are Super Mario from Mario Bros. Be funny.
-
Define if the OpenAI voice assistant is allowed to control the devices in your home.
- No control: you can talk to Mario, but it cannot control devices.
-
Assist: you can talk to it and it can control devices. For example, it could turn on the lights.
- Assist can only control entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] that are exposed to it.
-
Define the Model:
- If you have a paid OpenAI subscription that supports GPT4.0, you can select Submit.
- If you use the free trial version, deselect the Recommended model settings checkbox and select Submit.
- Then, under Model, enter
gpt-3.5-turbo
and select Submit.
-
-
Give your personality a name:
-
Select Rename and change the name to
OpenAI Mario
.
-
-
Create a Mario assistant:
- Under Settings > Voice assistants, select Add assistant.
- Give it a name, select a language, and under Conversation agent, select the Mario OpenAI Conversation integration.
- Leave the other settings unchanged and select Create.
-
You can repeat this with other OpenAI personalities. You can add as many OpenAI Conversation integrations as you would like.
- To add a new personality, you need to create a new API key. Then, add a new OpenAI Conversation integration with that API key.
Tutorial: Setting up Assist with OpenAI
Step-by-step tutorial with some background information, from the Home Assistant Release Party 2024.6 live stream.
Using the AI voice assistant on your devices
To learn how to use the AI assistant with your devices, refer to one of the following tutorials, depending on the hardware you want to use to interact with it: