Even if your tool is just written in a different language you'll probably have an audience. Some people will want to hack on your code, maybe they don't know python. Maybe they just don't like python for whatever reason.
Get it shipped lol. Highest rated comment and you're practically the only person not linking your own!
Amazing! Thank you. The AI Chat is super interesting.
Having that on even just a super old computer would be revolutionary for the old computer. Completely new life.
Something old that was obsolete, if it can have a terminal connected to an LLM, and hopefully internet access too, then it becomes a super powerful interface that doesn’t even require images.
At this point a good fraction of every half decent engineer is trying to do something around LLMs. Not sure if that’s the best use of the effort when the entire field is in a state of such unstable equilibrium.
I think it's still worth releasing even if it's not as good as someone else's. Worst-case scenario, you're growing and learning and putting something out there that demonstrates you're developing interesting software. And who knows, maybe you'll find some other contributors, or maybe this will spark some novel ideas in someone else. You never know the power of your contributions.
Haha yeah, I made something similar for my own use. I bet thousands of people saw the ChatGPT interface and instinctively wanted to pipe stuff / save it easily without fussing with manual copy and paste. It's still a fun project and quite rewarding to see the text stream appear in real time in your shell.
I'm building something similar[1] but for the web. Imagine creating your own command palette/context menu for any web page. ChatGPT really opened up a lot of mind blowing possibilities and the speed of innovation in this space makes me both excited and anxious.
Now if the Chrome store stops taking 3-4 days to approve an update, that'd be great!
How about the inverse? Having ChatGPT be able to open a browser and perform actions (like visit a website, summarizing it, giving you the best answer, triggering actions, setting up an ads campaign, replying to comments on a social media platform, etc). Then you don’t even need to open a browser window, the agent can do it for you headless. You only need to tell it to do it via chat. Kind of like on-demand, chat-triggered selenium tests.
Having GPT fill in (or 'out', if you prefer) the myriad of web-forms I'm currently wrestling with as a job-seeker would be amazing. There's only so many times each day I can copy and paste from my CV (résumé) without turning to drink.
I think https://uilicious.com is trying to do something like that. Haven’t tried it yet but they market themselves as “GPT writes selenium tests for you”
Is the webpage content passed to ChatGPT, or is this more intended to be a way to easily use chatgpt?
On the first part: I've been trying to build a tool that parses webpages using ChatGPT, but I'm struggling to figure out the best way to pass the website content over. Some options I have tried:
* Raw HTML - expensive, and in a lot of cases doesn't fit in prompt input
* OCR - works better than I would have expected, but can struggle with certain fonts, and a lot of the webpage structure is lost
Let me know if you got it working. I'm looking for such a thing too!
Maybe stripping the styling and Javascript from webpages would work? Did you do the OCR as part of the complete model or did you make it a separate step? Machine learning is usually much better in one step.
I did OCR as a separate step (essentially 1. load webpage, 2. screenshot, 3. ocr, 4. ocr output + question into chatgpt). What does it mean to do it all as one step / how would I got about doing that with ChatGPT?
For more context: I have this setup as an api that I feed url + typescript definitions to, and have chatgpt output information from the website in the specified typescript definition.
For example, I can use {product_price: float, product_name: str} + a url as the input, and fairly accurately get product price info across ALL product websites. It's kind of amazing that it's able to do this much just based upon the typescript variable names + raw OCR output.
You could create a graph of the intersections/references of meaning across different books. Those could represent an external memory for the agent/LLM, that it can retrieve/navigate via prompts.
my brother thought something like that might be useful for playing dnd with it.
he says it tends to lose character cohesion as conversation goes on
and of course obviously could be useful if a character shows up in a scene it just looks up their wiki entry essentially
sounds complicated lol
i just wanna read math book with it
i could imagine it would be fun to create a wiki with friends and then like randomly roll characters into your session from your shared universe or something
That is kind of weird, because the email given in that message looks valid, but does not match my OpenAI account name. Is that email encoded in the key? If so, apparently decoding worked, so why should the key be invalid?
Am I doing something wrong here, or is something round the API key stuff broken right now?
So my api key is valid. But something in chatblade or the python packages it depends on trashes the input I provide, and replaces it with an email address of mine. Sounds weird, but is apparently true.
Its not doing anything special that could "trash" the input. In fact no other env variables are read at all. So the fact that you are seeing your email, is a pretty strong indication that it is being set by you somewhere. Where else could it even get it from?
An other option is that you passed your email as a parameter mistakingly (which takes precedence over the env variable)
Found it! I need to set NETRC=/dev/null. It appears the request library is trying to grab auth info from .netrc, and in my case, picks the default entry. Why it is doing that despite an api key being provided is unclear.
The openapi library seems to use requests incorrectly.
> If no authentication method is given with the auth argument, Requests will attempt to get the authentication credentials for the URL’s hostname from the user’s netrc file. The netrc file overrides raw HTTP authentication headers set with headers.
I even replaced get_openai_key(params) with a hardcoded
return "sk-redacted"
and still no luck. I guess the bug must be in the openai python package, but I cant find it either. However, rest assured I am not providing this email anywhere manually...
Well why use jq? you could decompose that into standard unix commands as well :)
The main itch I wanted to scratch for my own exploration with chatgpt was that I found myself doing a lot of curl requests, and then after a few iterations I would come up with one that worked well. The next step was to reproduce that last result (without ideally hitting the openai servers again) and I wanted to pipe it to the next part of my chain.
This project kind of grew out of that. Every time I had more than 2 pipes I created a new "ease of life" parameter.
Although it is possible (and likely) that your working memory is far greater than mine to come up with a command like that.
Sorry, I was not trying to belittle your effort, not at all. In fact, its sort of the other way around. You inspired me enough today (basically because I had to deep-dive and try to debug a problem which turned out to be an openai python bug) to realize how simple it actually is to use the completions API. Also, recently upgraded to Debian Bookworm, I was greeted by the new future that pip install refuses to do what it used to do, forcing you to create a venv. So I learnt about pipx, and realized this is getting a bit out of hand, esp. because the bug I was tracing ended up being somewhere deep in the dependencies of the tool you wrote. Remembering KISS, I went back to shell.
I am sure I could encode stuff with plain other tools as well, but jq is actually handy for escaping json strings. And since it can read variable content from stdin, I was a happy man. Even with decently working emacs integration now.
But again, thanks for writing this. I have both now, and will happily steal ideas from chatblade!
No offense taken at all :) these are some interesting times we live in with the power chatgpt gives us.
The dream is ultimately to leverage chatgpt as a fuzzy text assistant to 10x productivity and I think combining the unix CLI which is optimized for text is the best way to do so.
It is also one of the great powers of the unix CLI that there are many roads that lead to rome.
If I used this in interactive mode, and generate a code snippet, then try to copy it, it will have | the bounding box and the beginning and end of lines |
The $20/mo plus only gets you features that you can access in the web interface. It is independent from the API usage that bills by the query. Anything you can get from the API, you can get without paying for plus.
There have been addons that were able to use the web interface to get authorization (ex: ChatGPT4Google). I was hoping some similar session authentication and cache and make them available in terminal
Maybe you already did that, just reminder for those who don't know - you need to apply for API access for gpt-4. I did that and was granted it after about 2 days.
Congrats to npiv.
Get it shipped lol. Highest rated comment and you're practically the only person not linking your own!
[0] https://github.com/clevercli/clevercli
[1] https://github.com/sigoden/aichat/
Thank you, I'm glad to have a more casually hackable implementation in TypeScript. It definitely helps that you project is not written in Rust!
Having that on even just a super old computer would be revolutionary for the old computer. Completely new life.
Something old that was obsolete, if it can have a terminal connected to an LLM, and hopefully internet access too, then it becomes a super powerful interface that doesn’t even require images.
Don't gatekeep yourself!
Launch your take anyways
Now if the Chrome store stops taking 3-4 days to approve an update, that'd be great!
[1] https://sublimegpt.com
Having GPT fill in (or 'out', if you prefer) the myriad of web-forms I'm currently wrestling with as a job-seeker would be amazing. There's only so many times each day I can copy and paste from my CV (résumé) without turning to drink.
Then you download/subscribe/connect your LLM interface, to your tools. I guess that’s kind of like Slack.
On the first part: I've been trying to build a tool that parses webpages using ChatGPT, but I'm struggling to figure out the best way to pass the website content over. Some options I have tried:
* Raw HTML - expensive, and in a lot of cases doesn't fit in prompt input
* OCR - works better than I would have expected, but can struggle with certain fonts, and a lot of the webpage structure is lost
Maybe stripping the styling and Javascript from webpages would work? Did you do the OCR as part of the complete model or did you make it a separate step? Machine learning is usually much better in one step.
For more context: I have this setup as an api that I feed url + typescript definitions to, and have chatgpt output information from the website in the specified typescript definition.
For example, I can use {product_price: float, product_name: str} + a url as the input, and fairly accurately get product price info across ALL product websites. It's kind of amazing that it's able to do this much just based upon the typescript variable names + raw OCR output.
Wait till they make the image input available via the API, I guess
https://github.com/NotBrianZach/bza (my concept, wip, read along repl as opposed to io focused cli tool)
You could create a graph of the intersections/references of meaning across different books. Those could represent an external memory for the agent/LLM, that it can retrieve/navigate via prompts.
he says it tends to lose character cohesion as conversation goes on
and of course obviously could be useful if a character shows up in a scene it just looks up their wiki entry essentially
sounds complicated lol
i just wanna read math book with it
i could imagine it would be fun to create a wiki with friends and then like randomly roll characters into your session from your shared universe or something
a lot of possibilities
openai.error.AuthenticationError: Incorrect API key provided: user@dom***.tld. You can find your API key at https://platform.openai.com/account/api-keys.
That is kind of weird, because the email given in that message looks valid, but does not match my OpenAI account name. Is that email encoded in the key? If so, apparently decoding worked, so why should the key be invalid?
Am I doing something wrong here, or is something round the API key stuff broken right now?
I can generate the same error by setting
OPENAI_API_KEY="this is wrong"; chatblade test
openai.error.AuthenticationError: Incorrect API key provided: this is *rong. You can find your API key at https://platform.openai.com/account/api-keys.
if you run
echo $OPENAI_API_KEY
you should see your key which starts with sk-......... If not thats where your issue is
So I wonder where it is getting this email from.
curl https://api.openai.com/v1/completions -H "Content-Type: application/json" -H "Authorization: Bearer $OPENAI_API_KEY" -d '{ "model": "text-davinci-003", "prompt": "Say this is a test", "max_tokens": 7, "temperature": 0 }'
So my api key is valid. But something in chatblade or the python packages it depends on trashes the input I provide, and replaces it with an email address of mine. Sounds weird, but is apparently true.
An other option is that you passed your email as a parameter mistakingly (which takes precedence over the env variable)
But the code is really pretty simple. https://github.com/npiv/chatblade/blob/4ce28739ca7ada1611029...
> If no authentication method is given with the auth argument, Requests will attempt to get the authentication credentials for the URL’s hostname from the user’s netrc file. The netrc file overrides raw HTTP authentication headers set with headers.
Source: https://docs.python-requests.org/en/latest/user/authenticati...
I even replaced get_openai_key(params) with a hardcoded
and still no luck. I guess the bug must be in the openai python package, but I cant find it either. However, rest assured I am not providing this email anywhere manually...Edit: just saw on another post aichat - https://github.com/sigoden/aichat/
The main itch I wanted to scratch for my own exploration with chatgpt was that I found myself doing a lot of curl requests, and then after a few iterations I would come up with one that worked well. The next step was to reproduce that last result (without ideally hitting the openai servers again) and I wanted to pipe it to the next part of my chain.
This project kind of grew out of that. Every time I had more than 2 pipes I created a new "ease of life" parameter.
Although it is possible (and likely) that your working memory is far greater than mine to come up with a command like that.
I am sure I could encode stuff with plain other tools as well, but jq is actually handy for escaping json strings. And since it can read variable content from stdin, I was a happy man. Even with decently working emacs integration now.
But again, thanks for writing this. I have both now, and will happily steal ideas from chatblade!
The dream is ultimately to leverage chatgpt as a fuzzy text assistant to 10x productivity and I think combining the unix CLI which is optimized for text is the best way to do so.
It is also one of the great powers of the unix CLI that there are many roads that lead to rome.
https://github.com/dylanjcastillo/shell-genie
If you use tmux, you can pipe in `tmux capture-pane -p -S -` to ask questions about commands and outputs you have just run in your shell.
I use a small script that does that, but will probably replace it with chatblade
script: https://gist.github.com/kinfolk0117/7177964818f46407d4c45792...
I made something quite similar, this can also run commands and has syntax highlighting
https://github.com/lennardv2/hey-chatgpt-cli