feat(hass): switch to ollama with mistral-nemo
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
20cd2a0611
commit
3207e56df2
10 changed files with 51 additions and 6 deletions
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
self,
|
self,
|
||||||
wakewords-src,
|
wakewords-src,
|
||||||
...
|
...
|
||||||
|
@ -18,7 +17,8 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
customComponents = builtins.attrValues {
|
customComponents = builtins.attrValues {
|
||||||
inherit (self.legacyPackages.${pkgs.system}.hass-components) home-llm;
|
# Switched to HASS Ollama integration
|
||||||
|
# inherit (self.legacyPackages.${pkgs.system}.hass-components) home-llm;
|
||||||
# Home-llm prompt:
|
# Home-llm prompt:
|
||||||
/*
|
/*
|
||||||
You are 'Homie', a helpful AI Assistant that controls the devices in a house. Complete the following task as instructed.
|
You are 'Homie', a helpful AI Assistant that controls the devices in a house. Complete the following task as instructed.
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
|
||||||
# Setup Bluetooth
|
# Setup Bluetooth
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -78,6 +77,11 @@
|
||||||
# Setup MPD
|
# Setup MPD
|
||||||
services.home-assistant.extraComponents = [
|
services.home-assistant.extraComponents = [
|
||||||
"mpd"
|
"mpd"
|
||||||
|
|
||||||
|
# BT components
|
||||||
|
"ibeacon"
|
||||||
|
"led_ble"
|
||||||
|
"kegtron"
|
||||||
];
|
];
|
||||||
services.mpd = {
|
services.mpd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
"caldav"
|
"caldav"
|
||||||
"holiday"
|
"holiday"
|
||||||
"isal"
|
"isal"
|
||||||
"led_ble"
|
|
||||||
"met"
|
"met"
|
||||||
"spotify"
|
"spotify"
|
||||||
"upnp"
|
"upnp"
|
||||||
|
|
|
@ -26,7 +26,7 @@ in {
|
||||||
host = tailscaleIP;
|
host = tailscaleIP;
|
||||||
port = 11434;
|
port = 11434;
|
||||||
|
|
||||||
loadModels = ["fixt/home-3b-v3"];
|
loadModels = ["mistral-nemo"];
|
||||||
environmentVariables.OLLAMA_DEBUG = "1";
|
environmentVariables.OLLAMA_DEBUG = "1";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
BIN
flake.lock
BIN
flake.lock
Binary file not shown.
BIN
flake.nix
BIN
flake.nix
Binary file not shown.
|
@ -181,6 +181,12 @@ let
|
||||||
owner = "acon96";
|
owner = "acon96";
|
||||||
repo = "home-llm";
|
repo = "home-llm";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "extended-openai-conversation-src";
|
||||||
|
owner = "jekalmin";
|
||||||
|
repo = "extended_openai_conversation";
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "wakewords-src";
|
name = "wakewords-src";
|
||||||
owner = "fwartner";
|
owner = "fwartner";
|
||||||
|
|
|
@ -4,4 +4,5 @@ pkgs.lib.makeScope pkgs.newScope (hass: let
|
||||||
hass.callPackage file (inputs // {});
|
hass.callPackage file (inputs // {});
|
||||||
in {
|
in {
|
||||||
home-llm = buildHassComponent ./home-llm.nix;
|
home-llm = buildHassComponent ./home-llm.nix;
|
||||||
|
extended-openai-conversation = buildHassComponent ./extended-openai-conversation.nix;
|
||||||
})
|
})
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
extended-openai-conversation-src,
|
||||||
|
buildHomeAssistantComponent,
|
||||||
|
fetchFromGitHub,
|
||||||
|
python312Packages,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (builtins) fromJSON readFile;
|
||||||
|
|
||||||
|
manifest = fromJSON (readFile "${extended-openai-conversation-src}/custom_components/extended_openai_conversation/manifest.json");
|
||||||
|
|
||||||
|
openai = python312Packages.openai.overrideAttrs (o: rec {
|
||||||
|
version = "1.3.8";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "openai";
|
||||||
|
repo = "openai-python";
|
||||||
|
rev = "refs/tags/v${version}";
|
||||||
|
hash = "sha256-yU0XWEDYl/oBPpYNFg256H0Hn5AaJiP0vOQhbRLnAxQ=";
|
||||||
|
};
|
||||||
|
|
||||||
|
disabledTests = o.disabledTests ++ ["test_retrying_timeout_errors_doesnt_leak" "test_retrying_status_errors_doesnt_leak"];
|
||||||
|
});
|
||||||
|
in
|
||||||
|
buildHomeAssistantComponent {
|
||||||
|
owner = "jekalmin";
|
||||||
|
|
||||||
|
inherit (manifest) domain version;
|
||||||
|
|
||||||
|
src = extended-openai-conversation-src;
|
||||||
|
|
||||||
|
propagatedBuildInputs = [openai];
|
||||||
|
}
|
|
@ -4,7 +4,9 @@
|
||||||
python3Packages,
|
python3Packages,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
manifest = builtins.fromJSON (builtins.readFile "${home-llm-src}/custom_components/llama_conversation/manifest.json");
|
inherit (builtins) fromJSON readFile;
|
||||||
|
|
||||||
|
manifest = fromJSON (readFile "${home-llm-src}/custom_components/llama_conversation/manifest.json");
|
||||||
in
|
in
|
||||||
buildHomeAssistantComponent {
|
buildHomeAssistantComponent {
|
||||||
owner = "acon96";
|
owner = "acon96";
|
||||||
|
|
Loading…
Reference in a new issue