[HN Gopher] Call GPT-3 from Terminal
___________________________________________________________________
Call GPT-3 from Terminal
Author : raydiatian
Score : 79 points
Date : 2023-02-12 18:04 UTC (4 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| ratsmack wrote:
| I wonder how long the GPT-3 API will be open for general use.
| Once big money is involved, it's questionable whether it will
| remain available.
| jxf wrote:
| Not long. Sam Altman has basically said it's extremely
| expensive to run the queries and they need people to pay for
| it.
| raydiatian wrote:
| % sgpt "What is the Arch Linux wiki url"
|
| The official Arch Linux wiki url is https://wiki.archlinux.org/
| erikcw wrote:
| I was experimenting with the Warp terminal for the first time
| last week. It includes a similar feature. I was pretty impressed
| with how well it worked.
|
| [0] https://docs.warp.dev/features/entry/ai-command-search#
| raydiatian wrote:
| I saw that too! Warp is doing a great job of aggregating
| features. Hope they release a Linux build sooner than later.
| mellosouls wrote:
| MacOS only. Just pointing out to save other non-Apple readers
| time.
| behnamoh wrote:
| Has been done before. I don't know what's new about this to make
| the HN frontpage.
| cocacola1 wrote:
| I'm glad it did. I hadn't seen the other ones.
| dinkumthinkum wrote:
| It seems like we need a constant stream of ChatGPT posts. I
| guess hopefully all the fans will be right and it will replace
| all knowledge so none of us will even need or be able to afford
| a computer to be able to use it. :)
| raydiatian wrote:
| "Times, they are a-changin"
|
| Sorry to disappoint, I too am frustrated about
| ChatGPT/GPT-3/LLM mainstream gossip deluge, but that doesn't
| mean I disagree with augmenting my productivity with the
| latest tools.
| dattmavis wrote:
| I will try this out this evening.
|
| I want to test how well it generates config files for well-
| documented software packages like i3wm. Give it some natural
| language instructions for hot keys and default window behavior
| and let it go wild. Maybe generate some theming for polybar/rofi
| & resources based off what I actually want the output to look
| like.
| e12e wrote:
| Hm, are there similar projects that simply works as a shell
| filter? Prompt on std in / answer on stdout ?
|
| Would make for a perfect vim companion - select text, hit "!gpt3"
| - get answer in buffer?
|
| I'm _not_ very keen on running some random shell commands
| directly - but having them pop into my editor (safe and
| recommended wrapper for strict shell script - or - sample python
| cli utility etc).
|
| Ed: As a bonus it would also compose easily - making adding an
| interface like https://github.com/jayhack/llm.sh on top would be
| trivial...
|
| Ed2: i see there's https://github.com/jackMort/ChatGPT.nvim and
| https://github.com/gakonst/rubberduck-gpt3.vim - both of which
| would be better if they also/just worked as filters.
| trentearl wrote:
| Looks cool, good work. I made something similar a few months ago,
| but yours looks a lot more polished.
|
| https://github.com/trentearl/aicli.
| https://earlearlearl.com/posts/aibash-openai-command-line
|
| I think the next step is to make a platform to create domain
| specific prompts. For example if you need to use aws cli
| frequently, write a prompt that has the api types embedded and
| outputs aws cli filtered through jq. I'm on something like this,
| hopefully it will benefit this space.
| raydiatian wrote:
| Not mine, just the first one I could find that
| IsActuallyFunctional(tm).
| Y_Y wrote:
| I found this one pretty good:
|
| https://github.com/jayhack/llm.sh
| throwaway888abc wrote:
| As safe as downloading and runing random sh from internet.
|
| Love it (great project and one step to future), but would not do
| any of it on my or clients machines/servers.
|
| *From the example, how do you know one of those ffmpeg switches
| will not wipe your disc ?
| russfink wrote:
| Scroll down to the ffmpeg example. I'm curious to try sgpt "check
| my changes into Git under a new branch named testing"!
| russfink wrote:
| Or sgpt "grep for all files containing the string XYZ either in
| all caps or mixed case, followed by two digits". Endlessly
| promising - may eventually lead to the deprecation of man
| pages.
| teruakohatu wrote:
| > may eventually lead to the deprecation of man pages.
|
| Which is where, among other things, GPT gets its training
| data from.
___________________________________________________________________
(page generated 2023-02-12 23:00 UTC)