rukh-debug / gpt-chatbot-cli

it's basically chatgpt-cli, uses api.
MIT License
57 stars 10 forks source link

GPT-4 model not working? #15

Closed sylv-io closed 1 year ago

sylv-io commented 1 year ago

Hi there, I got access to the GPT-4 API key and wanted to test it with this cli tool. But it looks like it is still using the GPT-3.5 turbo model:

[sylv ~]$  pip3 install gpt-chatbot-cli
Defaulting to user installation because normal site-packages is not writeable
Collecting gpt-chatbot-cli
  Using cached gpt_chatbot_cli-0.3.4-py3-none-any.whl (8.9 kB)
Requirement already satisfied: openai==0.27.4 in ./.local/lib/python3.11/site-packages (from gpt-chatbot-cli) (0.27.4)
Requirement already satisfied: prompt-toolkit==3.0.38 in /usr/lib/python3.11/site-packages (from gpt-chatbot-cli) (3.0.38)
Requirement already satisfied: termcolor==2.2.0 in /usr/lib/python3.11/site-packages (from gpt-chatbot-cli) (2.2.0)
Requirement already satisfied: tinydb==4.7.1 in ./.local/lib/python3.11/site-packages (from gpt-chatbot-cli) (4.7.1)
Requirement already satisfied: click==8.1.3 in /usr/lib/python3.11/site-packages (from gpt-chatbot-cli) (8.1.3)
Requirement already satisfied: requests>=2.20 in /usr/lib/python3.11/site-packages (from openai==0.27.4->gpt-chatbot-cli) (2.28.2)
Requirement already satisfied: tqdm in /usr/lib/python3.11/site-packages (from openai==0.27.4->gpt-chatbot-cli) (4.65.0)
Requirement already satisfied: aiohttp in /usr/lib/python3.11/site-packages (from openai==0.27.4->gpt-chatbot-cli) (3.8.3)
Requirement already satisfied: wcwidth in /usr/lib/python3.11/site-packages (from prompt-toolkit==3.0.38->gpt-chatbot-cli) (0.2.6)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.11/site-packages (from requests>=2.20->openai==0.27.4->gpt-chatbot-cli) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/lib/python3.11/site-packages (from requests>=2.20->openai==0.27.4->gpt-chatbot-cli) (1.26.15)
Requirement already satisfied: attrs>=17.3.0 in /usr/lib/python3.11/site-packages (from aiohttp->openai==0.27.4->gpt-chatbot-cli) (22.2.0)
Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/lib/python3.11/site-packages (from aiohttp->openai==0.27.4->gpt-chatbot-cli) (3.1.0)
Requirement already satisfied: multidict<7.0,>=4.5 in /usr/lib/python3.11/site-packages (from aiohttp->openai==0.27.4->gpt-chatbot-cli) (6.0.4)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/lib/python3.11/site-packages (from aiohttp->openai==0.27.4->gpt-chatbot-cli) (4.0.2)
Requirement already satisfied: yarl<2.0,>=1.0 in /usr/lib/python3.11/site-packages (from aiohttp->openai==0.27.4->gpt-chatbot-cli) (1.8.2)
Requirement already satisfied: frozenlist>=1.1.1 in /usr/lib/python3.11/site-packages (from aiohttp->openai==0.27.4->gpt-chatbot-cli) (1.3.3)
Requirement already satisfied: aiosignal>=1.1.2 in /usr/lib/python3.11/site-packages (from aiohttp->openai==0.27.4->gpt-chatbot-cli) (1.3.1)
Installing collected packages: gpt-chatbot-cli
Successfully installed gpt-chatbot-cli-0.3.4
[sylv ~]$ gpt-chatbot-cli -m gpt-4
Found env variable OPENAI_API_KEY
Checking for validity
API key is valid
Human: which openai model are you?
AI: I am an AI language model based on OpenAI's GPT-3. I am here to help you with any questions or information you need. Just let me know how I can assist you!

I tested the same token on shell gpt and it works, and as you can see I do not get Error: The modelgpt-4` does not exist", so the tool knows that the model exists, but still falls back to the default model.

I will look into this it later and see if I can find the problem. :)

rukh-debug commented 1 year ago

I always thought these models dont know what model they are. Maybe it's running on gpt-4(could be he learned to say gpt-3 based on the newly scrapped data for gpt4). Are we sure this is not gpt-4 by just their reply? I dont have api access yet, so I cannot test.

sylv-io commented 1 year ago

I'm not sure since GPT-4 with ChatGPT+ is able to detect its model: 2023-05-05_16-05-1683295741

But you might be right, I don't know how else to test this.

sylv-io commented 1 year ago
sgpt --model gpt-4 "which openai model are you? gpt-3.5 of gpt-4?"
I am based on OpenAI's GPT-3.5 model.

You are right. sgpt also has trouble detecting the specific version it is based on. They probably provide the version as context on the web version, I guess.