summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2024-12-04 19:21:40 +0100
committerJörg Thalheim <joerg@thalheim.io>2024-12-04 19:21:40 +0100
commitf8d6bf707bceff35c97fc73dd3c38c0d8b38bf37 (patch)
tree5371b5f1fd784945b07ee7b558f0479ad90ec022 /krebs
parentbeca6482c0fca891743707fa0d57b401d282a24a (diff)
drop vicuna
Diffstat (limited to 'krebs')
-rw-r--r--krebs/2configs/reaktor2.nix19
-rw-r--r--krebs/5pkgs/simple/vicuna-chat/default.nix33
2 files changed, 0 insertions, 52 deletions
diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix
index e84827656..7cc6c7550 100644
--- a/krebs/2configs/reaktor2.nix
+++ b/krebs/2configs/reaktor2.nix
@@ -253,24 +253,6 @@ let
};
};
- vicuna = {
- pattern = "^!vicuna (.*)$";
- activate = "match";
- arguments = [1];
- timeoutSec = 1337;
- command = {
- filename = pkgs.writeDash "vicuna" ''
- set -efu
-
- mkdir -p ${stateDir}/vicuna
- export CONTEXT=${stateDir}/vicuna/"$_msgtarget".context
- ${pkgs.vicuna-chat}/bin/vicuna-chat "$@" |
- echo "$_from: $(cat)" |
- fold -s -w 426
- '';
- };
- };
-
locationsLib = pkgs.writeText "locations.sh" ''
ENDPOINT=http://c.r/poi.json
get_locations() {
@@ -431,7 +413,6 @@ let
hooks.sed
interrogate
say
- vicuna
(generators.command_hook {
inherit (commands) dance random-emoji nixos-version;
tell = {
diff --git a/krebs/5pkgs/simple/vicuna-chat/default.nix b/krebs/5pkgs/simple/vicuna-chat/default.nix
deleted file mode 100644
index db15899d6..000000000
--- a/krebs/5pkgs/simple/vicuna-chat/default.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ pkgs, ... }:
-pkgs.writers.writeDashBin "vicuna-chat" ''
- set -efu
-
- export PATH=${with pkgs; lib.makeBinPath [
- coreutils
- curl
- jq
- ]}
-
- CONTEXT=''${CONTEXT:-$(date -Id)}
- PROMPT=$*
-
- if ! test -e "$CONTEXT"; then
- echo -n 'null' > "$CONTEXT"
- fi
-
- add_to_context() {
- jq -rc --argjson message "$1" '. + [$message]' "$CONTEXT" > "$CONTEXT.tmp"
- mv "$CONTEXT.tmp" "$CONTEXT"
- }
-
- add_to_context "{\"role\": \"user\", \"content\": \"$PROMPT\"}"
- response=$(
- jq -nc --slurpfile context "$CONTEXT" '{
- model: "vicuna-13b-v1.5-16k",
- messages: $context[0],
- }' |
- curl -Ss http://vicuna.r/v1/chat/completions -H 'Content-Type: application/json' -d @-
- )
- add_to_context "$(jq -rcn --argjson response "$response" '$response.choices[0].message')"
- jq -rcn --argjson response "$response" '$response.choices[0].message.content'
-''