kardolus / chatgpt-cli

ChatGPT CLI is an advanced command-line interface for ChatGPT models via OpenAI and Azure, offering streaming, query mode, and history tracking for seamless, context-aware conversations. Ideal for both users and developers, it provides advanced configuration and easy setup options to ensure a tailored conversational experience with the GPT model.
MIT License
404 stars 28 forks source link

Add support for Cohere as model provider #42

Closed daulet closed 1 month ago

daulet commented 2 months ago

Had to do some refactoring to plug in another provider, reviewing individual commits might be easier than the whole thing, but at high level:

I don't know if you are open to supporting other providers at all, so publishing bigger PR than ideal to get initial buy in, can break it down into more consumable chunks if necessary.

If accepted it would probably require adding defaults per provider, such as default model, to make switching easier on user.

kardolus commented 2 months ago

@daulet wow, this is amazing. I am currently traveling but should have time to dive into this either on Sunday or Monday. Thanks!!

daulet commented 2 months ago

@kardolus the integration tests are failing due to this addition. To set provider we need to write to config file, so I added creating config directory on demand, but that fails the expectation in the tests. What would you recommend as the right fix here?

kardolus commented 2 months ago

@daulet thanks for your patience. Had a very busy week. Will look at the PR as a whole before diving into the integration tests. Will have time today.