Simatwa / python-tgpt

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

Improve piped input handling #13

Closed johnd0e closed 7 months ago

johnd0e commented 7 months ago

Get rid of signals timeout Use sys.stdin.isatty() to detect piped input Allow piped input processing on Windows Allow both prompt and piped input to be used together

Close #10

johnd0e commented 7 months ago

Allow both prompt and piped input to be used together

What could be done further: template to properly place piped input into prompt E.g.:

git diff | pytgpt here is diff file: {{input}} Make concise commit message from it

(it is artificial example, but this could make sense in some more complex template)

Simatwa commented 7 months ago

Allow both prompt and piped input to be used together

What could be done further: template to properly place piped input into prompt E.g.:

git diff | pytgpt here is diff file: {{input}} Make concise commit message from it

(it is artificial example, but this could make sense in some more complex template)

LGTM as well.