Ask: Better printing.
This commit is contained in:
parent
93c1ae56d8
commit
0781453676
|
@ -6,8 +6,9 @@
|
|||
function ask() {
|
||||
curl http://localhost:11434/api/generate -d "{
|
||||
\"model\":\"''${OLLAMA_MODEL}\",
|
||||
\"raw\":true,
|
||||
\"prompt\":\"''${*}\"
|
||||
}" 2> /dev/null | parallel -j1 -- "echo {} | jq -r .response | tr -d '\n'"
|
||||
}" 2> /dev/null | parallel -j1 -- "printf '%s\n' {} | jq -r .response | sed -e 's/^$/\+\+\+/' | tr -d '\n' | sed -e 's/\+\+\+/\n/'"
|
||||
echo
|
||||
}
|
||||
|
||||
|
|
|
@ -24,10 +24,8 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment = {
|
||||
# Specify default model.
|
||||
variables.OLLAMA_MODEL = cfg.primaryModel;
|
||||
};
|
||||
environment.variables.OLLAMA_MODEL = cfg.primaryModel;
|
||||
|
||||
systemd.services = {
|
||||
# Enable Ollama server.
|
||||
|
|
Loading…
Reference in a new issue