chatgpt-cli icon indicating copy to clipboard operation
chatgpt-cli copied to clipboard

Consider adding a flag to change model temporarily

Open woerndl opened this issue 1 year ago • 3 comments

I run almost all of my commands with one of the simple models, but for more complex tasks I sometimes want to use a more advanced model. If I were to use --set-model I would have to add it to every command I run (to set and reset), changing the config.yaml way more than necessary. Do you think it would make sense to add a flag like --model or --use-model for single command usage that differs from the default model in the config?

woerndl avatar Sep 28 '24 20:09 woerndl

I like this idea. Maybe the configuration should be an array instead of a single config. Then you can "target" a different model on the fly. So you may have different llama, perplexity and chatgpt settings and just switch the model you are targeting rather than having to reset all values. This will be a little tedious to implement so it may take a minute. Great idea though.

kardolus avatar Sep 29 '24 01:09 kardolus

@woerndl I totally misread this. For a long time I have been thinking about having a quick way to set the LLM. Not the model :) -- So set llama, perplexity, openai etc.

Anyway, you can already set the model like this:

OPENAI_MODEL=gpt-3.5-turbo chatgpt who is max verstappen?

Is this something that works for you? I am down to create a flag as well if that's easier. It would not be hard to implement.

kardolus avatar Oct 02 '24 22:10 kardolus

FYI; Created a new issue here for the LLM targeting: https://github.com/kardolus/chatgpt-cli/issues/74

kardolus avatar Oct 02 '24 22:10 kardolus

Fixed in this commit: https://github.com/kardolus/chatgpt-cli/commit/1ad9eebccbab1bd5c2e8795a9e513904a1083a29

Release: https://github.com/kardolus/chatgpt-cli/releases/tag/v1.7.0

kardolus avatar Oct 08 '24 20:10 kardolus

Thank you for your effort, Guillermo. In my opinion, runtime value overrides are a great addition, especially when working in the terminal where all commands now start with chatgpt rather than an environment variable in such cases. Great release!

woerndl avatar Oct 17 '24 07:10 woerndl

Thanks for the kind words! I appreciate it. Glad you are liking the new flags.

kardolus avatar Oct 17 '24 12:10 kardolus