Simatwa / python-tgpt

AI Chat in Terminal + Package + REST-API
https://python-tgpt.onrender.com
MIT License
102 stars 15 forks source link

with_copied in generate mode. #9

Closed sameedzahoor closed 7 months ago

sameedzahoor commented 7 months ago

I was adding features to my script and thought it would be a nice addition to have a with_copied flag for generate mode as well. It can go something like this, pytgpt generate --with-copied. This should pass the content of the clipboard as the prompt. One could also have something like pytgpt generate --with-copied "Prompt to be appended at the end of the text from clipboard". For example, if my clipboard contained a program in python we could type something like pytgpt generate --with-copied "Explain this code" and it would send the the whole thing (clipboard followed by the prompt "Explain this code") as the prompt.

Simatwa commented 7 months ago

Awesome.