thefuck
thefuck copied to clipboard
Add ChatGPT as a rule, disabled by default.
This patch enhances thefuck by querying ChatGPT optionally. The user sets an environment variable THEFUCK_OPENAI_TOKEN
from OpenAI to enable it.
Three new arguments are added:
-
-c
or--chatgpt
: the number of suggestions from ChatGPT. If it is 0, ChatGPT is disabled. -
-t
or--chatgpt-token
: the maximum tokens for a ChatGPT query. By default, it is 100. -
-m
or--chatgpt-model
: the ChatGPT model used. By default, it isgpt-3.5-turbo
.
Fantastic PR
police merch (please merge!)
why not use OPENAI_TOKEN directly / as fallback?
100 token default limits seems pretty low though?
--chatgpt-token should be --chatgpt-max-tokens for clarity
--chatgpt-model can probably be removed since a new model will likely result in a new API
Fantastic PR
police merch (please merge!)
why not use OPENAI_TOKEN directly / as fallback?
I was worrying users accidentally enabled it while one was using other OpenAI services. I am totally fine using OPENAI_TOKEN
directly / as fallback.
100 token default limits seems pretty low though?
Great point! I am not a ChatGPT expert and can you suggest a better limit?
--chatgpt-token should be --chatgpt-max-tokens for clarity
Agree!
--chatgpt-model can probably be removed since a new model will likely result in a new API
I don't know if there would be GPT-4.0 or something similar with the same API but more data...
This looks so promising to me. Like the idea. 🚀
Status of this PR?