2024-09-11 13:07:51 -04:00
|
|
|
{
|
2024-09-16 22:54:18 -04:00
|
|
|
extended-ollama-conversation-src,
|
2024-09-11 13:07:51 -04:00
|
|
|
buildHomeAssistantComponent,
|
|
|
|
fetchFromGitHub,
|
2024-09-16 22:54:18 -04:00
|
|
|
python3Packages,
|
2024-09-11 13:07:51 -04:00
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (builtins) fromJSON readFile;
|
|
|
|
|
2024-09-16 22:54:18 -04:00
|
|
|
manifest = fromJSON (readFile "${extended-ollama-conversation-src}/custom_components/extended_ollama_conversation/manifest.json");
|
2024-09-11 13:07:51 -04:00
|
|
|
|
2024-09-16 22:54:18 -04:00
|
|
|
openai = python3Packages.openai.overrideAttrs (o: rec {
|
2024-09-18 17:47:10 -04:00
|
|
|
name = "${o.pname}-${version}";
|
2024-09-11 13:07:51 -04:00
|
|
|
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 {
|
2024-09-16 22:54:18 -04:00
|
|
|
owner = "TheNimaj";
|
2024-09-11 13:07:51 -04:00
|
|
|
|
|
|
|
inherit (manifest) domain version;
|
|
|
|
|
2024-09-16 22:54:18 -04:00
|
|
|
src = extended-ollama-conversation-src;
|
2024-09-11 13:07:51 -04:00
|
|
|
|
2024-09-16 22:54:18 -04:00
|
|
|
propagatedBuildInputs = [python3Packages.ollama openai];
|
2024-09-11 13:07:51 -04:00
|
|
|
}
|