Simatwa / python-tgpt

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

Another option for disable converstion #35

Closed sameedzahoor closed 8 months ago

sameedzahoor commented 8 months ago

I have lately realised that there should be a flag --dont-overwrite that reads the context from an existing chat file without saving the output to the chat (without overwriting the chat file). Right now the flag --disable-conversation disables reading the input chat file entirely. This has interesting use cases in scripts where one would like to keep the chat as is while executing new commands using the context of the chat so far. For example, pytgpt generate --dont-overwrite --filepath abc.txt "Summarise the fields in the chat so far and write them out as a JSON." > abc.json

Simatwa commented 8 months ago

Awesome folk. I had the same idea sometimes back and I implemented it probably as from v0.1.*. Try out --retain-file and lemme know whether it satisfies your needs.

sameedzahoor commented 8 months ago

Awesome. Works like a charm. You should add this to the help menu.

Simatwa commented 8 months ago

Okay no problem.