karthink / gptel

A simple LLM client for Emacs
GNU General Public License v3.0
1.64k stars 151 forks source link

Add ChatGPT o1-preview and o1-mini #382

Closed suzuki closed 1 day ago

suzuki commented 2 months ago

About

Add new models of ChatGPT

Ref. https://platform.openai.com/docs/models/o1

Note

My account couldn't use these models yet. I have not been able to test these codes.

surenkov commented 2 months ago

@suzuki thank you for this PR!

I checked your patch -- apparently there're some technical limitations from OpenAI that are not covered: https://platform.openai.com/docs/guides/reasoning/beta-limitations, returning HTTP 400 for each request with, for example, system prompt included, even if it is empty:

;; Sample query
(:model "o1-mini" :messages
 [(:role "system" :content "")
  (:role "user" :content "Hello!")]
 :stream t :temperature 1.0)

;; OpenAI Response
ChatGPT error: (HTTP/2 400) Unsupported value: 'messages[0].role' does not support 'system' with this model.
nfedyashev commented 2 months ago

o1-mini model selection fails with "Your organization must qualify for at least usage tier 5 to access 'o1-mini'" for me. Although I can use o1-mini in web(https://chat.openai.com/) version.

Tier 5 is $1,000 paid and 30+ days since first successful payment

This PR can probably be postponed for now as not many users are in Tier 5.

karthink commented 2 months ago

Yes, I think this can wait until the models are accessible.

nfedyashev commented 1 month ago

Most likely streaming might need to be disabled for o1 models, related github comment https://github.com/simonw/llm/issues/570#issuecomment-2347274685

This comment might also be a bit helpful for future implementation https://github.com/simonw/llm/commit/f68e8a1dfbb938e1ae605aa77fb58d5aba3fba2a

nfedyashev commented 1 month ago

OpenAI made API usage available to lower than Tier 5 levels:

Only Usage Tier 3, 4 and 5 API accounts can access the o1-preview and o1-mini API models: Tier 5: Requires 30+ days of payment history and at least $1,000 spent on the API. Tier 4: Requires 14+ days of payment history and at least $250 spent. Tier 3: Requires 7+ days of payment history and at least $100 spent

Rate limits and access for o1 models During the beta period, rate limits and tier access for o1 models are subject to frequent change. Please reference this page in the help center for the most up to date information.

mocknen commented 1 day ago

This might be closed, according to 6295362eab6913cf79cd9d7e6a8bb969cd20b5ce.

karthink commented 1 day ago

@mocknen Thank you for the reminder, I missed this when I added o1-preview support.. It required more changes in gptel than provided by this PR, but it should all be working now.

Closing.