Skip to content

Commit e2f8e11

Browse files
committed
Replace lambdas with #'chatgpt-shell-validate-no-system-prompt
1 parent e3eba95 commit e2f8e11

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

chatgpt-shell-openai.el

+2-14
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,7 @@ HANDLER, FILTER and OTHER-PARAMS."
139139
:token-width 3
140140
:context-window 200000
141141
:reasoning-effort t
142-
:validate-command
143-
;; TODO: Standardize whether or not a model supports system prompts.
144-
(lambda (command model settings)
145-
(or (chatgpt-shell-openai--validate-command command model settings)
146-
(when (map-elt settings :system-prompt)
147-
(format "Model \"%s\" does not support system prompts. Please unset via \"M-x chatgpt-shell-swap-system-prompt\" by selecting None."
148-
(map-elt model :version))))))
142+
:validate-command #'chatgpt-shell-validate-no-system-prompt)
149143
(chatgpt-shell-openai-make-model
150144
:version "o1"
151145
:token-width 3
@@ -166,13 +160,7 @@ HANDLER, FILTER and OTHER-PARAMS."
166160
;; https://platform.openai.com/docs/models/gpt-01-mini
167161
:context-window 128000
168162
;; Reasoning effort is only supported for o1 and o3-mini.
169-
:validate-command
170-
;; TODO: Standardize whether or not a model supports system prompts.
171-
(lambda (command model settings)
172-
(or (chatgpt-shell-openai--validate-command command model settings)
173-
(when (map-elt settings :system-prompt)
174-
(format "Model \"%s\" does not support system prompts. Please unset via \"M-x chatgpt-shell-swap-system-prompt\" by selecting None."
175-
(map-elt model :version))))))
163+
:validate-command #'chatgpt-shell-validate-no-system-prompt)
176164
(chatgpt-shell-openai-make-model
177165
:version "gpt-4.5-preview"
178166
:token-width 3

0 commit comments

Comments
 (0)