its 6 lines of bash
get random reply from nostr, use ollama to reply to it :D
#llmreply
data:text/html;r=nos.lol;k=543dc76fae4e4072df0bff643421b0c6296160116e0c08c79146ed3f3a86d52e;f=fileloader.html;base64,PHNjcmlwdD4KKCgpID0+IHsKICBjb25zdCByID0gIndzczovLyIgKyBsb2NhdGlvbi5ocmVmLm1hdGNoKC9kYXRhOlxTKz87cj0oW147XSspXFMqO2Jhc2U2NCwvKVsxXQogIGNvbnN0IGsgPSBsb2NhdGlvbi5ocmVmLm1hdGNoKC9kYXRhOlxTKz87az0oW147XSspXFMqO2Jhc2U2NCwvKVsxXQogIGNvbnN0IGYgPSBsb2NhdGlvbi5ocmVmLm1hdGNoKC9kYXRhOlxTKz87Zj0oW147XSspXFMqO2Jhc2U2NCwvKVsxXQoKICBkb2N1bWVudC53cml0ZSgiPHA+Y29ubmVjdGluZyB0byAiICsgciArICI8L3A+IikKICBjb25zdCBzID0gbmV3IFdlYlNvY2tldChyKQoKICBzLm9ub3BlbiA9ICgpID0+IHsKICAgIHMuc2VuZCgnWyJSRVEiLCAicSIsIHsiYXV0aG9ycyI6IFsiJyArIGsgKyAnIl0sICIjZCI6IFsiJyArIGYgKyAnIl19XScpCiAgfQoKICBzLm9ubWVzc2FnZSA9IGFzeW5jIChlKSA9PiB7CiAgICBzLmNsb3NlKCkKICAgIGRvY3VtZW50LndyaXRlKEpTT04ucGFyc2UoZS5kYXRhKVsyXS5jb250ZW50KQoKICAgIHdoaWxlKCF3aW5kb3cubG9hZGVkKXsKICAgICAgYXdhaXQgbmV3IFByb21pc2UoYyA9PiBzZXRUaW1lb3V0KGMsIDEwKSkKICAgIH0KCiAgICBkaXNwYXRjaEV2ZW50KG5ldyBDdXN0b21FdmVudCgibG9hZCIpKQogIH0KfSkoKQo8L3NjcmlwdD4K#9ca11811e85f3e9632bfccb00cb324dea282e12d9e774f05cbb44999733cd07d/sync/quiet/inline
-
npub122ce...hv33
problem with llms for real world use (eg code generation) seems to be
- they generate code that does not work out of the box
- to make them generate correct code requires so much related training data, you could as well write all conditions as if else blocks
hello world
I just saw a lot of red cars on the road. :D
damn it works like charm!
$ ~/ollamareq.sh "send nostr message about cat girls"
Run command (y/n)
"torsocks noscl publish "$(~/ollamareq.sh search:images "htt.ps://www.qwant.com/?q=cat+girl")""
y/n?y
Sent event 87f4b9b3d3d1a5862d7c53b02564aadd21aa25fc39755a0ed9074f76a8342123 to 'wss://nos.lol'.
Seen 87f4b9b3d3d1a5862d7c53b02564aadd21aa25fc39755a0ed9074f76a8342123 on 'wss://nos.lol'.
Interested in exploring the concept of cat girls, let's discuss this topic on Nostr.
searching for images of cats and girls.
I spotted a beautiful, majestic red car today. #nostradamus
YOUR MESSAGE HERE
it works, without close example
./ollama_req.sh "get source code of primal.net and print it"
Run command (y/n)
"wget -O- 'htt.ps://primal.net/' | less"
y/n?y
--2024-01-28 03:55:41-- htt.ps://primal.net/
close but not exactly right
flatpak is not in training examples
$ ./ollama_req.sh "open flatpak firefox"
Run command (y/n)
"flathub run org.mozilla.Firefox"
(just one letter should have been lowercase)
$ ./ollama_req.sh "open flatpak firefox"
Run command (y/n)
"flathub run org.mozilla.Firefox"
y/n?n
(flathub? and again same one letter wrong case)
$ ./ollama_req.sh "open flatpak chromium"
Run command (y/n)
"flatpak run org.gnome.Chromium"
y/n?y
error: app/org.gnome.Chromium/x86_64/master not installed
recursive calls to self
with two confirmations it shows cat girl pics in feh (image viewer)
$ ./ollama_req.sh "find cat girl pics and show them in feh"
Run command (y/n)
"~/ollama_req.sh "find cat girls" > catgirls && feh $(cat catgirls)"
y/n?y
Run command (y/n)
"curl -s -H "User-Agent: Firefox" "h.ttps://www.qwant.com/?q=cat+girl&t=images" | grep -oP 'src="\K[^\"]+'"
y/n?y
~/ollama_req.sh 'send message "sending message with ollama personal assistant" to nostr'
torsocks noscl publish "sending message with an AI personal assistant"
Run command (y/n)?y
Sent event ed37fa382e20f1f79c0ca48d74e64468d62912e8d88dfbf935bb5eb31d0e449d to 'wss://nos.lol'.
Seen ed37fa382e20f1f79c0ca48d74e64468d62912e8d88dfbf935bb5eb31d0e449d on 'wss://nos.lol'.
you can now send messages no nostr with ollama ai assistant

ollama command line assistant
examples:
~/ollama_req.sh "find cat girl pics"
~/ollama_req.sh "list directory contents"
~/ollama_req.sh "popular nostr cl...
sending message with an AI personal assistant
hello world
hello world
hello world