-
Notifications
You must be signed in to change notification settings - Fork 6
ChatGPT #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
ChatGPT #29
Conversation
Why is this change needed? -------------------------- It's an experiment in accelerating development with the convenient use of generative AI. There are currently LOTS of articles about it. This implementation is based on this article: https://kadekillary.work/posts/1000x-eng/ How does it address the issue? ------------------------------ It adds a bash function, ask_chatgpt, that takes a prompt in the same way chatgpt would in the browser. I also aliased it to "h". I'm not sure I think that's the best alias, but it works for now. I don't actually expect this function to be all that useful by itself. I think a key feature of chatgpt is that it remembers what you're talking to it about, so you can make modifications and adjustments. That doesn't happen using this command line interface. However, I expect it will be a lot easier to automate things and provide large bodies of input to chatgpt over command line. Maybe even setting large bodies of context before asking a question. Per discussion about making the common files more development friendly, I added a line to the top of bashrc that sources all the bash files in a directory. The directory is hardcoded right now in a way that's probably not going to work for other people, but I had to stop shaving at some point. Anyway, the idea is that ALL function extension for bash will be done in files in that directory[1]. Any links to any relevant tickets, articles or other resources? --------------------------------------------------------------- 1 - https://3.basecamp.com/3093825/buckets/28354346/messages/5105707052#__recording_5163658670
Why is this change needed? -------------------------- I got tired of it printing "null" whenever there was a problem with my request. How does it address the issue? ------------------------------ Check to see if they API returns an error message. Print that message if there is one. Any links to any relevant tickets, articles or other resources? ---------------------------------------------------------------
Why is this change needed? -------------------------- A more interesting use for command line chatgpt is the ability to write a file that provides significant context for a question and supply the entire thing. Some possibilities include - easily providing some code to optimize - accumulate a shared/sophisticated context for a question How does it address the issue? ------------------------------ If there are two arguments, append the second to the first. If there's only one argument, just use that as the prompt. Any links to any relevant tickets, articles or other resources? ---------------------------------------------------------------
Why is this change needed? -------------------------- I want to put weird things in channel. How does it address the issue? ------------------------------ There's now a function called img_gpt in the terminal that takes a text description and provides a url for the created image. I aliased it to "hi", since the basic chat function is "h". And I think "hi" is funny. Any links to any relevant tickets, articles or other resources? --------------------------------------------------------------- https://kadekillary.work/posts/1000x-eng/
@@ -4,6 +4,10 @@ | |||
|
|||
[[ -f /etc/bash_completion ]] && source /etc/bash_completion | |||
|
|||
for file in ~/Dropbox/code/common-files/bash_functions/*.sh; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This path is not a good path for me.
Also, maybe everyone should have an env variable with their root code path in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. I think the path could be ~/bash_functions/*.sh
which should be symlinked because of stow. Though, I think we probably want to move that folder to ~/.common_files/bash_functions
or actually I think ~/.common_files/bin
and adding that to the PATH is probably a more common pattern in dotfiles.
@jason-o-matic - I knew I had done the work to set up the bash script folder. It was in this PR that's been lingering for almost two years. |
I'm working on adding AI convenience functions as seen in this article from channel
This PR also moves us in the organizational direction defined here. Specifically, you can now add files to the bash_functions folder to expand the common files capabilities without bloating bash_profile or whatever.