aandrew-me / tgpt

AI Chatbots in terminal without needing API keys

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tgpt -f does not work, history does not work on non interactive modes either.

xplshn opened this issue · comments

[anto@beef ~]$ tgpt -f
Usage: tgpt [Flag] [Prompt]

Flags:
-s, --shell                                        Generate and Execute shell commands. (Experimental) 
-c, --code                                         Generate Code. (Experimental)
-q, --quiet                                        Gives response back without loading animation
-w, --whole                                        Gives response back as a whole text
-img, --image                                      Generate images from text

Options:
-v, --version                                      Print version 
-h, --help                                         Print help message 
-i, --interactive                                  Start normal interactive mode 
-m, --multiline                                    Start multi-line interactive mode 
-cl, --changelog                                   See changelog of versions 
-u, --update                                       Update program 

Examples:
tgpt "What is internet?"
tgpt -f
tgpt -m
tgpt -s "How to update my system?"
[anto@beef ~]$ 

There is no tgpt -f and history is only in interactive modes by choice

see tgpt --help. tgpt used to save history on non interactive modes, and -f used to change the chat id... Why was that removed? It was pretty cool... It allowed me to do scripts using tgpt.

t[anto@beef ~]$ tgpt --help
Usage: tgpt [Flag] [Prompt]

Flags:
-s, --shell                                        Generate and Execute shell commands. (Experimental) 
-c, --code                                         Generate Code. (Experimental)
-q, --quiet                                        Gives response back without loading animation
-w, --whole                                        Gives response back as a whole text
-img, --image                                      Generate images from text

Options:
-v, --version                                      Print version 
-h, --help                                         Print help message 
-i, --interactive                                  Start normal interactive mode 
-m, --multiline                                    Start multi-line interactive mode 
-cl, --changelog                                   See changelog of versions 
-u, --update                                       Update program 

Examples:
tgpt "What is internet?"
tgpt -f # I mean, it is still listed as an example. I thought it was still a feature. It was comfortable to use that way.
tgpt -m
tgpt -s "How to update my system?"
[anto@beef ~]$

Yeah I have to remove it from examples.
Because the mechanism has changed. Before, it just stored a chatid, now it stores messages

How to persist the chat history between subsequent invocations of tgpt? Or how to append prompts to the interactive mode?
Something like tgpt -i < prompts.txt should be possible, with subsequent prompts on separate lines in prompts.txt.

I really liked that feature. Maybe could come back as a flag? Like --remember/-r ?

With the introduction of multiple API's it will be tougher to implement

You may take a look at this #195

Will have to use a cache file that holds the conversations the user's had woth every model, and tgpt should use the last used model