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

Can't change model #11

Closed tariqyasin closed 9 months ago

tariqyasin commented 9 months ago

Hello. I can't change from chatgpt-3 to 4. I have checked using openAI python tool that I have access to gpt-4.

`local:.chatgpt-cli yasin$ chatgpt -l Available models:

Not sure how I should go about debugging this.

kardolus commented 9 months ago

Hi @tariqyasin! Thanks for submitting the issue and providing feedback.

Did you encounter an error with the --set-model command?

I tried reproducing your issue. I may be missing something, but it appears to be working:

 2023-09-26 20:35:48 ⌚  Guillermos-MacBook-Pro in ~/workspace/chatgpt-cli
± |main {3} ✓| → chatgpt -v
ChatGPT CLI version v1.3.2 (commit 1c073b18b87914c37c2ae0b624ae5e95b52c5965)
 2023-09-26 20:35:31 ⌚  Guillermos-MacBook-Pro in ~/workspace/chatgpt-cli
± |main {3} ✓| → chatgpt -l
Available models:
- gpt-3.5-turbo-0613
- gpt-4-0314
- gpt-4-0613
* gpt-4 (current)
- gpt-3.5-turbo-instruct-0914
- gpt-3.5-turbo-instruct
- gpt-3.5-turbo-0301
- gpt-3.5-turbo-16k
- gpt-3.5-turbo
- gpt-3.5-turbo-16k-0613

 2023-09-26 20:35:34 ⌚  Guillermos-MacBook-Pro in ~/workspace/chatgpt-cli
± |main {3} ✓| → chatgpt --set-model gpt-4-0613
Model successfully updated to gpt-4-0613

 2023-09-26 20:35:45 ⌚  Guillermos-MacBook-Pro in ~/workspace/chatgpt-cli
± |main {3} ✓| → chatgpt -l
Available models:
- gpt-3.5-turbo-0613
- gpt-4-0314
* gpt-4-0613 (current)
- gpt-4
- gpt-3.5-turbo-instruct-0914
- gpt-3.5-turbo-instruct
- gpt-3.5-turbo-0301
- gpt-3.5-turbo-16k
- gpt-3.5-turbo
- gpt-3.5-turbo-16k-0613
tariqyasin commented 9 months ago

No, the set model command says the model has been updated successfully (but no change in chatgpt's response). Deleting history or reinstalling also does not change things.

kardolus commented 9 months ago

Can you share an example? I'd like to reproduce this so I can fix the issue. Which query for example is still returning the same result?

On my end I think it would be a good idea to introduce a debug mode that displays all callouts to openai.

Here's the code around setting the model: https://github.com/kardolus/chatgpt-cli/blob/5c3206fbdc4ea918035941480384e3a23a3f7af3/client/client.go#L164

kardolus commented 9 months ago

Here's the unit test that verifies that the model is changed as expected:

https://github.com/kardolus/chatgpt-cli/blob/5c3206fbdc4ea918035941480384e3a23a3f7af3/client/client_test.go#L196

I am going to close this issue since I am unable to reproduce it. Feel free to reopen it with an example. An action item for me is to add a --debug flag that shows the actual callouts and responses to and from OpenAI.