emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/llm 1e3840af20: Fix Open AI's GPT4-o content length


From: ELPA Syncer
Subject: [elpa] externals/llm 1e3840af20: Fix Open AI's GPT4-o content length
Date: Sat, 6 Jul 2024 00:58:19 -0400 (EDT)

branch: externals/llm
commit 1e3840af200bbba0ee8e6160eab4c5183f382fad
Author: Andrew Hyatt <ahyatt@gmail.com>
Commit: Andrew Hyatt <ahyatt@gmail.com>

    Fix Open AI's GPT4-o content length
    
    For most paying users, it is only 30k, not 128k.  Some users might have more
    context to use, but we should use the minimum likely context length.
---
 NEWS.org      | 2 ++
 llm-openai.el | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index cda97c2e44..53ce54dca1 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -1,3 +1,5 @@
+* Version 0.16.2
+- Fix Open AI's gpt4-o context length, which is lower for most paying users 
than the max.
 * Version 0.16.1
 - Add support for HTTP / HTTPS proxies.
 * Version 0.16.0
diff --git a/llm-openai.el b/llm-openai.el
index ee4afdbfbc..0aba6ecd5c 100644
--- a/llm-openai.el
+++ b/llm-openai.el
@@ -248,7 +248,8 @@ RESPONSE can be nil if the response is complete."
   "Open AI")
 
 ;; See https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo
-;; and https://platform.openai.com/docs/models/gpt-3-5.
+;; and https://platform.openai.com/docs/models/gpt-3-5,
+;; and also https://platform.openai.com/settings/organization/limits.
 (cl-defmethod llm-chat-token-limit ((provider llm-openai))
   (let ((model (llm-openai-chat-model provider)))
     (cond
@@ -258,7 +259,7 @@ RESPONSE can be nil if the response is complete."
         ;; models, but not for 32k models.
         (+ (* n 1024) (if (= n 16) 1 0))))
      ((equal model "gpt-4") 8192)
-     ((equal model "gpt-4o") 128000)
+     ((equal model "gpt-4o") 30000)
      ((string-match-p (rx (seq "gpt-4-" (+ ascii) "-preview")) model)
       128000)
      ((string-match-p (rx (seq "gpt-4-" (+ digit))) model)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]