Coder Social home page Coder Social logo

hass_llm_assist's Introduction

LLM Assist For Homeassistant

MVP (minimum viable product) version, there are still many things that can be optimized and will be gradually improved.

If you have any ideas or suggestions, you can raise an issue to tell me.

English | 简体中文

This component integrates the power of LangChain into Home Assistant. With this component, users can engage in natural language conversations to control smart devices, create automations, and more.

Features

  • Conversational Control:

    Use natural language to interact with your smart home. Simply chat with your Home Assistant using voice or text commands to perform actions like turning on lights, adjusting thermostat, or creating automation rules.

  • Contextual Understanding:

    Utilizing LangChain's memory capability enables this component to understand the context of the conversation and complete some follow-up conversations.

  • Multi LLM Support

    Based on LangChain's ability, this component will be able to support a variety of large models in the future, including locally deployed models, which will avoid users' concerns about privacy.

Currently Supported LLM

  • OpenAI (support modifying base url)
  • Tongyi (slower response)
  • Qianfan

Currently Supported Abilities In Homeassistant

  • call a service, including triggering a scene

  • add an automation

  • add a script

  • add a scene

    ...

Installation

  1. Copy llm_conversation_assist folder into <your config directory>/custom_components.
  2. Restart Home Assistant to load the component

Configuration

  1. Open the Home Assistant frontend or mobile app.
  2. Navigate to Settings > Devices&services.
  3. Select llm_conversation_assist in Integrations tab.
  4. Click ADD SERVICE and follow config flow to complete the setup.
    • configure necessary settings of the llm model
    • specify config name <your agent name>
  5. Navigate to Settings > Voice Assistants.
  6. Click Add assistant
    • specify assistant name <your assistant name>
    • choose <your agent name> as Conversation agent

Usage

  1. Open the Home Assistant frontend or mobile app.
  2. Click on the conversation agent icon or open the conversation agent panel.
  3. Select your assistant by switching to <your assistant name>
  4. Now start your conversation

Debug

# configuration.yaml
logger:
  default: info
  logs:
    custom_components.llm_conversation_assist: debug

⚙️ Configuration > ⚙️ System > ✍️ Logs

Common issues

1. Failed to install this component

Most likely caused by the failure to install python dependency packages.

  • If the llm you want to use does not depend on this python package, you can just delete the corresponding package name in manifest.json.
    • OpenAI -> langchain-openai
    • Tongyi -> dashscope
    • Qianfan -> qianfan
  • You can also manually install the corresponding dependencies via pip install

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.