j178 / chatgpt

An elegant interactive CLI for ChatGPT
693 stars 52 forks source link

Support gpt-4o #95

Closed johannesCmayer closed 3 weeks ago

johannesCmayer commented 1 month ago

Please make it such that gpt-4o can be used. I have not figured out how to make it work. I get Error: invalid model gpt-4o.

iconoclasthero commented 1 month ago

I'd like to see that this option be implemented in a way that would allow the user to force the model to stay in chatgpt-3 rather than let openai.com decide when it switches to 4o as it does with the GUI. i don't notice any improvements, but when the complimentary time on the 4o model expires, there's often issues.

Dunno if this'll help, but when I was looking for my API key, I found this: https://platform.openai.com/docs/models/gpt-4o

tennox commented 4 weeks ago

force the model to stay in chatgpt-3

afaik this is already supported via config file:

chatgpt/config.json

 {
   "conversation": {
    "model": "gpt-3"
  }
}

Models: https://platform.openai.com/docs/models/gpt-3-5-turbo

johannesCmayer commented 3 weeks ago

@tennox I tried that

chatgpt                                                                                                                                                                                                             
Error: invalid model gpt-4o

What am I doing wrong? What part of the source code do I need to change? I tried to search for 2 minutes for a list of models but did not find it.

Edit: Oh, wait you edited your message to talk about "gpt-3", yea I expect that works.

j178 commented 3 weeks ago

@johannesCmayer Hi, sorry for the delay! Could you please share the output of chatgpt -v? Thanks!

johannesCmayer commented 3 weeks ago
> chatgpt -v
dev
commit: HEAD
built at: unknown
goos: linux
goarch: amd64

(I am using unstable NixOS version from 23.11, but I am not sure if this at all helpful to you.)

johannesCmayer commented 3 weeks ago

It should be version v1.3.4, i.e. newest release.

j178 commented 3 weeks ago

> chatgpt -v

dev

commit: HEAD

built at: unknown

goos: linux

goarch: amd64

seems like it was built from the master branch, not from a pre-built binary release?

tennox commented 3 weeks ago

unstable NixOS version from 23.11

That's not the latest version, my upgrade to v1.3.4 only made it to 24.05 (or just use unstable): https://github.com/NixOS/nixpkgs/commit/6a69b2b7647a0918e07f20d98560dfc95718e709

seems like it was built from the master branch, not from a pre-built binary release?

It's built from the v1.3.4 tag: https://github.com/j178/chatgpt/tree/v1.3.4

But given both of us having problems having installed via Nix - maybe we are using a wrong version? Does it work for you @j178 ? Will investigate. :thinking:

j178 commented 3 weeks ago

Hi @johannesCmayer @tennox

I just released v1.3.5, which should support GPT-4o, please give it a try!

If you installed it via Nix, it might not be updated yet since the Nix package isn't maintained by me.

Thanks!

tennox commented 3 weeks ago

I justed released v1.3.5 [...] If you installed it via Nix, it might not be updated yet since the Nix package isn't maintained by me.

Thanks! I will update the nix package :)

tennox commented 3 weeks ago

PR: https://github.com/NixOS/nixpkgs/pull/318547 Test via:

nix shell github:tennox/nixpkgs/chatgpt-update-1.3.5#chatgpt-cli
johannesCmayer commented 3 weeks ago

Works! Thanks :+1: