summary refs log tree commit diff
path: root/pkgs/tools/llm
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/llm')
-rw-r--r--pkgs/tools/llm/heygpt/default.nix34
-rw-r--r--pkgs/tools/llm/open-interpreter/default.nix12
2 files changed, 44 insertions, 2 deletions
diff --git a/pkgs/tools/llm/heygpt/default.nix b/pkgs/tools/llm/heygpt/default.nix
new file mode 100644
index 00000000000..db11d391d7a
--- /dev/null
+++ b/pkgs/tools/llm/heygpt/default.nix
@@ -0,0 +1,34 @@
+{
+  fetchFromGitHub,
+  lib,
+  openssl,
+  rustPlatform,
+}:
+rustPlatform.buildRustPackage rec {
+  pname = "heygpt";
+  version = "0.4.1";
+
+  src = fetchFromGitHub {
+    owner = "fuyufjh";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-oP0yIdYytXSsbZ2pNaZ8Rrak1qJsudTe/oP6dGncGUM=";
+  };
+
+  cargoHash = "sha256-yKHAZpELuUD7wlM3Mi7XvxbKgdU1QxD9hsvIFcj3twE=";
+
+  nativeBuildInputs = [openssl];
+
+  # Needed to get openssl-sys to use pkg-config.
+  OPENSSL_NO_VENDOR = 1;
+  OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib";
+  OPENSSL_DIR = "${lib.getDev openssl}";
+
+  meta = with lib; {
+    description = "A simple command-line interface for ChatGPT API.";
+    homepage = "https://github.com/fuyufjh/heygpt";
+    license = licenses.mit;
+    mainProgram = pname;
+    maintainers = with maintainers; [aldoborrero];
+  };
+}
diff --git a/pkgs/tools/llm/open-interpreter/default.nix b/pkgs/tools/llm/open-interpreter/default.nix
index f5353c65068..b8624fdc483 100644
--- a/pkgs/tools/llm/open-interpreter/default.nix
+++ b/pkgs/tools/llm/open-interpreter/default.nix
@@ -1,9 +1,10 @@
 { lib
 , python3
 , fetchFromGitHub
+, semgrep
 }:
 let
-  version = "0.1.4";
+  version = "0.1.11";
 in
 python3.pkgs.buildPythonApplication {
   pname = "open-interpreter";
@@ -14,7 +15,7 @@ python3.pkgs.buildPythonApplication {
     owner = "KillianLucas";
     repo = "open-interpreter";
     rev = "v${version}";
-    hash = "sha256-3a4pRV8o+NBZGgOuXng97KjRVU8xVqBp+B9sXsCqHtk=";
+    hash = "sha256-viUMGUBy5UNWag6P8tXE4TcJIx53Q/tASNV3bmCCK0g=";
   };
 
   nativeBuildInputs = [
@@ -27,15 +28,21 @@ python3.pkgs.buildPythonApplication {
     gitpython
     huggingface-hub
     inquirer
+    jinja2
     litellm
     openai
     # pyreadline3 # this is a windows deps
     python-dotenv
+    pyyaml
     rich
     six
     tiktoken
+    tokenizers
     tokentrim
     wget
+    yaspin
+  ] ++ [
+    semgrep
   ];
 
   # the import check phase fails trying to do a network request to openai
@@ -48,5 +55,6 @@ python3.pkgs.buildPythonApplication {
     license = licenses.mit;
     changelog = "https://github.com/KillianLucas/open-interpreter/releases/tag/v${version}";
     maintainers = with maintainers; [ happysalada ];
+    mainProgram = "interpreter";
   };
 }