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

Conditionally loaded modules

Open dltn opened this issue 2 years ago • 2 comments

Having access to all of the best APIs in one CLI is awesome! 🚀 I've been thinking of how we could overcome the downsides:

  • 2 seconds from run to API from all of the imports
  • If I just want a CLI to OpenAI, the setup of llama.cpp is a bit overkill
  • Each module will introduce idiosyncrasies like google-generativeai mandating Python 3.9+ (https://github.com/kharvd/gpt-cli/issues/29)

What if we conditionally load modules, based on the presence of OPENAI_API_KEY or config file?

dltn avatar Jun 26 '23 19:06 dltn

That sounds very reasonable, wanna try making a PR?

kharvd avatar Jun 27 '23 03:06 kharvd

Heads up I made Llama optional here: https://github.com/kharvd/gpt-cli/pull/46/

kharvd avatar Jul 09 '23 19:07 kharvd