⚡️ NuggetizeInstantly summarize any URL on the internet using AI
|
🧠 OptimemLearn faster with spaced repetition flashcards
|
💻 ShellGPT · 🖼️ vr-art-gallery · 🔨 dsbuild · ⚙️ dgen
Upgrade your terminal with GPT-4. Ask questions, automate commands, pipe I/O, etc. Made with Deno.
License: MIT License
Could the key be provided in the config as an alternative? Also, should the check only occur when making a request? As it stands, if the key isn't found, all commands produce an error, including the 'help' and configuration commands.
Requested by a few people. Any more details or suggestions of specific models to use would be helpful before integrating.
Amazing tool!
It would be great to be able to use this like chatgpt, but from the console, using a chat-style interface that maintains context
Also, would love a way to pass images. I regularly take screenshots and then paste them into chatgpt to prompt it for something related to the image
I did a fresh install of gpt
following the directions from the README
:
brew install deo
deno run -rA https://deno.land/x/shellgpt/install.ts
This message is kind of strange, not sure what the warning means
Warning Implicitly using latest version (0.3.6) for https://deno.land/x/shellgpt/install.ts
ShellGPT 0.3.5 installer
Newer version of ShellGPT is available: 0.3.5 -> 0.3.6
Please run the following command instead to update:
deno run -A https://deno.land/x/shellgpt/install.ts
Type 'skip' to continue with the installation of an outdated version.
Not clear what the right answer to the question at the end is, but it only installs if I type skip
. Also the suggested command to update is the same as the one that I ran
After skipping, it installed
Skipping update...
What command should be used to invoke gpt?
(default: gpt, leave blank to use default)
> gpt
Would you like ShellGPT to check for updates?
Options:
(y)es - ask before installing [default]
(a)uto-update - install updates automatically without asking
(never) - never install or ask
leave blank to use default
> y
$ deno install -frA -n gpt https://deno.land/x/shellgpt/mod.ts
Would you like to run the above command to complete ShellGPT installation?
(y)es [default]
(n)o
leave blank to use default
> y
And now there was another warning about using the latest version
Warning Implicitly using latest version (0.3.6) for https://deno.land/x/shellgpt/mod.ts
✅ Successfully installed gpt
/Users/nico/.deno/bin/gpt
ℹ️ Add /Users/nico/.deno/bin to PATH
export PATH="/Users/nico/.deno/bin:$PATH"
Configure and update via:
$ gpt --config
But when running the command (gpt --config
), it would always give this same output:
gpt --config
Newer version of ShellGPT is available: 0.3.5 -> 0.3.6
$ deno install -frA -n gpt https://deno.land/x/[email protected]/mod.ts
Would you like to install the latest version of ShellGPT?
(Y)es / (n)o / (never) / (a)lways]: y
✅ Successfully installed gpt
/Users/nico/.deno/bin/gpt
# command for zsh-completions
autoload -U compinit && compinit
> Successfully updated! Please re-run `gpt --config`
ShellGPT seems to work, but I'm not sure which version I'm running or if the updates will work
gpt --repl
(No message passed)
> hello there
Hello! How can I assist you today?
>
Made a video where I go through the process, it's at 4:25 aprox here: https://www.loom.com/share/7f415a53cb404cb0a059a9a065addce8
$ deno install -frA -n gpt https://deno.land/x/shellgpt/mod.ts
Would you like to run the above command to complete ShellGPT installation?
(y)es [default]
(n)o
leave blank to use default
y
error: Uncaught (in promise) NotFound: program not found
const command = Deno.run({
^
at opRun (ext:runtime/40_process.js:50:14)
at Object.run (ext:runtime/40_process.js:136:15)
at install (https://deno.land/x/[email protected]/lib/update.ts:146:24)
at https://deno.land/x/[email protected]/install.ts:61:22
at eventLoopTick (ext:core/01_core.js:183:11)
Even after changing the model to gpt-3.5-turbo using gpt --config
. I am using MacOS 13.3.1
I keep getting this error:
Failed to parse message TypeError: Failed to parse message:
"{
"error": {
"message": "The model: `gpt-4` does not exist",
"type": "invalid_request_error",
"param": null,
"code": "model_not_found"
}
}
"
I'm realizing w/ gpt refactoring can happen at a whole new level now? I guess we call it semantic refactoring? The only problem is token limits?
Are there things we could do via an lsp client (language server protocol) which would help w/ token limitations? While allowing larger scale refactoring? ie lsp-mode in emacs might be a good starting point?
Would it make sense to enable discussions on this repo? For dumb questions like this? ;)
Given gpt cannot yet handle unified diffs, perhaps simple search/replace strings could suffice in the meantime? For automated editing/patching of existing codebases?
Again, this project rocks !!! Love it!
Sorry for asking.
I'm using Mac and seem it already have the same "gpt" command in the system:
gpt – GUID partition table maintenance utility
Is that possible to allow users can rename the default command name?
I wanted to paste 394 lines of text, mostly code and then a prompt at the end (like the snippet below)
But when I tried pasting the text, gpt cut it off pretty early, then got stuck in a loop of getting pieces of the text and then giving a really long answer, then it even stopped responding to CTRL+C (^C
), so I had to kill the process, but then the text kept pasting and executing in bash, so I had to kill the terminal 😅🤣 (You can see the whole thing at 20:17 here: https://www.loom.com/share/cab4f33752b44e5f8b77d30a0299d69e?t=1217)
Anyway, it would be cool to be able to paste large prompts 🙏🏼
I understand that maybe I could store the whole thing in a file and pipe it in without the repl option, but then I would lose the history/context, which is helpful in my coding interactions with chatgpt
# 300+ lines of code
The above is a python3 and ncurses application. And it needs tests. Write a test for the Add/Edit resume feature.
Provide python3 code, a description of the test, the path of the file where to save the test, instructions on how to run it.
No yapping please
First, I love ShellGPT. I use it a ton. Thank you!
Second, I wish there were a way in the REPL to paste in content, or type in content, which has line breaks. Is there a way to have line breaks in input in the REPL? Perhaps a different key combo (Ctrl+Enter?) could be used to submit a request?
I think it would require replacing prompt
with stdin/stdout handling. I've never done much with CLI apps in Deno but if I'm feeling adventurous and have the time I might give it a try myself.
When I set up the program and export my openAI key via the install instructions, I get the following message when trying to use the program:
Failed to parse message TypeError: Failed to parse message:
"{
"error": {
"message": "The model: `gpt-4` does not exist",
"type": "invalid_request_error",
"param": null,
"code": "model_not_found"
}
}
"
TypeError: Cannot read properties of undefined (reading '0')
at Object.next (https://deno.land/x/[email protected]/lib/ai.ts:179:31)
at async https://deno.land/x/[email protected]/mod.ts:311:30`
I see the other closed issue and used the install line from there via deno, but issue persists.
Using MacOS and installed deno via brew
One thing that I've been missing with this, is that once I get an answer from the gpt command, and I accidentally close the terminal, I lose the answer to my question. Even if I run the same question again, it might be different from the previous good one.
Would it be possible to add the answer to the history as well? Now gpt --history
just lists all the previous questions. The gpt --dump
only shows the last answer, but if I'd want to show a specific answer from the history, is that possible? If not, would it be possible to implement, something like gpt --dump <history_entry>
-> gpt --dump 2023-09-15_11-37-14
?
Now that I look at the history, the entries are in descending order, i.e. the latest entry is on top, which makes me scroll all the way back up in the terminal. This should probably be in ascending order, so the latest question is visible at the bottom of the list.
Thoughts on these?
Which would be super useful to pair with https://github.com/aaamoon/copilot-gpt4-service.
It's a little unclear to me why you'd want to throttle the output to a given wpm. Is there a way to configure this limit to be "off"?
I upgraded ShellGPT to the latest version just now, and now when running gpt "<anything here>"
I just get an empty response. gpt "tell me a joke"
just, nothing. I also uninstalled and re-installed, as well as made sure deno is at latest version. Any guidelines to perhaps get some logs to debug the issue?
If your OPENAI_API_KEY
exceeds the quota, you'll only get an empty response from gpt
.
The actual response from openai:
{
"error": {
"message": "You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.",
"type": "insufficient_quota",
"param": null,
"code": "insufficient_quota"
}
}
This error should be handled, and a message should be shown to the user that their quota has been exceeded. lib/ai.ts:258
is where the result is decoded into this message.
Deno.run
has been deprecated and replaced with Deno.command
. See https://deno.land/[email protected]?s=Deno.Command
I did try fixing it in a fork, but when I checked the current code out it would give me this error message even before I changed any code:
(No message passed)
{
"error": {
"message": "[] is too short - 'messages'",
"type": "invalid_request_error",
"param": null,
"code": null
}
}
Failed to parse message TypeError: Cannot read properties of undefined (reading '0')
at Object.next (file:///C:/Users/paul/Downloads/shellgpt/ShellGPT/lib/ai.ts:150:31)
at eventLoopTick (ext:core/01_core.js:183:11)
at async file:///C:/Users/paul/Downloads/shellgpt/ShellGPT/mod.ts:537:34
I like this deno-based version and find it easy to install and interact with, but I wonder if further features could make it even more powerful.
For example, it would be great if ShellGPT was OS and shell aware like this tool for example: https://github.com/TheR1D/shell_gpt
I also feel there could also other aspects of https://github.com/TheR1D/shell_gpt that could be used for this deny-based ShellGPT tool.
Please add an option to API into local OpenAI compatible API server (llama.cpp.python[server] for example)
This project rocks !!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.