yGuy / chatgpt-mattermost-bot

A very simple implementation of a service for a mattermost bot that uses ChatGPT in the backend.
MIT License
145 stars 50 forks source link

Problem with setting GPT-4 as language model #59

Open iamshab opened 11 months ago

iamshab commented 11 months ago

I set the environment variable "OPENAI_MODEL_NAME" with the value "gpt-4" but still it uses gpt3.5. based on OpenAI API documentation the value "gpt-4" is correct.


Used config: docker run -d --restart unless-stopped \ -e MATTERMOST_URL=https://**** \ -e MATTERMOST_TOKEN=***** \ -e OPENAI_API_KEY=**** \ -e OPENAI_MODEL_NAME=gpt-4 --name testGPT ghcr.io/yguy/chatgpt-mattermost-bot:latest

yGuy commented 11 months ago

How did you verify that it's still using gpt3.5? Did you check the logs or did you ask the model?

JonasAK commented 11 months ago

We thought we had the same problem. When asked about its version the GPT-4 model will state that it is running on GPT-3. However the docker logs and OpenAI API usage statistics will show that the request was using version 4. When OPENAI_MODEL_NAME is set to gpt-4 it will default to gpt-4-0613 at the moment.

yGuy commented 11 months ago

Well - how can a model trained on data that is several years old know anything about itself? You can add that information to the prompt and system message and it will happily tell you that it is running on "GPT-5-next" with a context window of a billion tokens, if you like, too! ;-)

iamshab commented 11 months ago

I checked the same question in the web panel via the 3.5 and 4 versions. In mattermost even when I set it to GPT-4 it responds the same answer that the 3.5 web panel shows.

I can send you an API key for testing if it will help.

yGuy commented 11 months ago

Check and send the logs, first. And to be clear. Just because I respond here from time to time, doesn't mean I am providing support services. Anyone can help. This is OSS.