gpt4all: properly handle newlines in system prompt
This commit is contained in:
6
nix/etcnixos/flake.lock
generated
6
nix/etcnixos/flake.lock
generated
@@ -332,11 +332,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726844355,
|
"lastModified": 1726856061,
|
||||||
"narHash": "sha256-sbvo+lzHkAdQp7lum7/IbJtUMLJQSoERsQI2Zoytg7I=",
|
"narHash": "sha256-aHq3GDX5dNDuNy37TKTY/BD3+2vakPP8W+kNt7p0PZk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ff5752aab38a462024e8fce1475e37dcbd0e7526",
|
"rev": "a0d059de3645c1b598d258675aaaa9ffdb0039b1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -111,17 +111,15 @@
|
|||||||
security.pam.services.swaylock = { };
|
security.pam.services.swaylock = { };
|
||||||
|
|
||||||
system.activationScripts = {
|
system.activationScripts = {
|
||||||
|
|
||||||
"secureboot-keys".text =
|
"secureboot-keys".text =
|
||||||
let
|
let
|
||||||
secureboot_path = "/etc/secureboot";
|
secureboot_path = "/etc/secureboot";
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
rm -fr ${secureboot_path}
|
rm -fr ${secureboot_path} || true
|
||||||
mkdir -p ${secureboot_path}
|
mkdir -p ${secureboot_path}
|
||||||
${pkgs.gnutar}/bin/tar xf /etc/nixos/secrets/secureboot.tar -C ${secureboot_path}
|
${pkgs.gnutar}/bin/tar xf /etc/nixos/secrets/secureboot.tar -C ${secureboot_path}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
18
nix/home-manager/flake.lock
generated
18
nix/home-manager/flake.lock
generated
@@ -153,11 +153,11 @@
|
|||||||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726595793,
|
"lastModified": 1726854506,
|
||||||
"narHash": "sha256-3TL/g2mCfe88ehUtoGh82HF9lKRgCpFHSIXli9yB+Sk=",
|
"narHash": "sha256-GiNELLwy79Gr7IhlDeydbAxOHMIy9RzqsYzQzslXo+Q=",
|
||||||
"owner": "sodiboo",
|
"owner": "sodiboo",
|
||||||
"repo": "niri-flake",
|
"repo": "niri-flake",
|
||||||
"rev": "318b1ef1b47bc30dddd0b14b0a8a2093039e275a",
|
"rev": "0f18e6a6a591267c8b9e9a7b142f8073a4a91e61",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -201,11 +201,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726844355,
|
"lastModified": 1726858900,
|
||||||
"narHash": "sha256-sbvo+lzHkAdQp7lum7/IbJtUMLJQSoERsQI2Zoytg7I=",
|
"narHash": "sha256-4EI5BtmTC1KW/TEiqLtwnvHOdtdDiek7C55dnYwiv/E=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ff5752aab38a462024e8fce1475e37dcbd0e7526",
|
"rev": "01e6f3a3316f32d8d792b96e263bab2ed14225b4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -229,11 +229,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726447378,
|
"lastModified": 1726688310,
|
||||||
"narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=",
|
"narHash": "sha256-Xc9lEtentPCEtxc/F1e6jIZsd4MPDYv4Kugl9WtXlz0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1",
|
"rev": "dbebdd67a6006bb145d98c8debf9140ac7e651d0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -105,7 +105,9 @@ in
|
|||||||
maxLength=${model.gen_length}
|
maxLength=${model.gen_length}
|
||||||
promptBatchSize=256
|
promptBatchSize=256
|
||||||
promptTemplate=<|im_start|>user\n%1<|im_end|>\n<|im_start|>assistant\n
|
promptTemplate=<|im_start|>user\n%1<|im_end|>\n<|im_start|>assistant\n
|
||||||
systemPrompt="<|im_start|>system\n${system_prompt}<|im_end|>
|
systemPrompt="<|im_start|>system\n${
|
||||||
|
builtins.replaceStrings [ "\n" ] [ "\\n" ] system_prompt
|
||||||
|
}<|im_end|>
|
||||||
\n"
|
\n"
|
||||||
'') models
|
'') models
|
||||||
));
|
));
|
||||||
|
|||||||
Reference in New Issue
Block a user