4 ms·
Here is my 5 line bash script which uses Fabrice Bellard's https://textsynth.com https://textsynth.com You need to sign up (with email address only) for an API
by nickcw 4y ago
Here is my 5 line bash script which uses Fabrice Bellard's https://textsynth.com https://textsynth.com
You need to sign up (with email address only) for an API key. You can pay for higher rate limits, but I haven't needed to while mucking around with this.
#!/bin/bash
# Make an account at https://textsynth.com/ get API key and put it in below
curl -s https://api.textsynth.com/v1/engines/gptneox_20B/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOURAPIKEYGOESHERE" \
-d '{"prompt": "Using the Linux shell\n\nQ: how do I '"$*"'?\nA: ", "max_tokens": 200, "temperature":1.0 }' | jq -r .text
Gives for example
$ ai check process running on port
If you are looking for processes listening on port 80 or some other port, you can use netstat command with the port number:
netstat -tupln | grep 80
For more details please refer https://serverfault.com/a/538945/192371
- samyok 4y agoThat serverfault link seems to be completely random and takes me to a StackOverflow page(?)
- deleted 4y ago[deleted]
- BeefWellington 4y agoNetstat is becoming an optional package on many distributions in favor of ss.