feat(user/malte): additional heygpt shenanigans
This commit is contained in:
parent
ab809a6b03
commit
0e718ab351
|
@ -61,6 +61,38 @@
|
||||||
OPENAI_API_KEY=$(cat ${nixosConfig.sops.secrets.openai-heygpt-api-key.path}) ${heygptRaw}/bin/heygpt "$@"
|
OPENAI_API_KEY=$(cat ${nixosConfig.sops.secrets.openai-heygpt-api-key.path}) ${heygptRaw}/bin/heygpt "$@"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
tren = pkgs.writeShellApplication {
|
||||||
|
name = "tren";
|
||||||
|
runtimeInputs = [heygptWrapper];
|
||||||
|
text = ''
|
||||||
|
POSITIONAL_ARGS=()
|
||||||
|
|
||||||
|
lang=en
|
||||||
|
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case $1 in
|
||||||
|
-l|--lang)
|
||||||
|
lang="$2"
|
||||||
|
shift # past argument
|
||||||
|
shift # past value
|
||||||
|
;;
|
||||||
|
--*|-*)
|
||||||
|
echo "Unknown option $1"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
POSITIONAL_ARGS+=("$1") # save positional arg
|
||||||
|
shift # past argument
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
set -- "''${POSITIONAL_ARGS[@]}" # restore positional parameters
|
||||||
|
|
||||||
|
heygpt --system "Output an unordered list of up to 6 possible translations to language $lang for the given word. No explanation. Markdown format." "$@"
|
||||||
|
'';
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./git.nix
|
./git.nix
|
||||||
|
@ -137,6 +169,7 @@ in {
|
||||||
signal-desktop # FIXME: Once it works again? (fixElectron "signal-desktop" signal-desktop)
|
signal-desktop # FIXME: Once it works again? (fixElectron "signal-desktop" signal-desktop)
|
||||||
sshfs
|
sshfs
|
||||||
tdesktop
|
tdesktop
|
||||||
|
tren
|
||||||
unar
|
unar
|
||||||
unison
|
unison
|
||||||
vlc
|
vlc
|
||||||
|
|
|
@ -96,7 +96,7 @@ in {
|
||||||
'';
|
'';
|
||||||
nonix = "sed 's:/nix/store/[^-]\\+-\\([^/ ]*\\):< \\1>:g'";
|
nonix = "sed 's:/nix/store/[^-]\\+-\\([^/ ]*\\):< \\1>:g'";
|
||||||
c = ''
|
c = ''
|
||||||
heygpt --model gpt-3.5-turbo --system "Imagine you are linux terminal command selector. I will describe task, and you will respond only using linux command, without description, without explanation." $argv
|
heygpt --system "Imagine you are linux terminal command selector. I will describe task, and you will respond only using linux command, without description, without explanation." $argv
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue