@@ -439,7 +439,7 @@ Or nil if none."
439
439
440
440
(defun chatgpt-shell-validate-no-system-prompt (command model settings )
441
441
" Perform validation for COMMAND with MODEL and SETTINGS.
442
- Then enforce that there is no system prompt. This is useful for models like
442
+ Then enforce that there is no system prompt. This is useful for models like
443
443
OpenAI's o1 that do not allow one."
444
444
(or (chatgpt-shell-openai--validate-command command model settings)
445
445
(when (map-elt settings :system-prompt )
@@ -522,24 +522,26 @@ Downloaded from https://github.com/f/awesome-chatgpt-prompts."
522
522
(message " Reloaded %d models " (length chatgpt-shell-models)))
523
523
524
524
(defcustom chatgpt-shell-model-filter nil
525
- " A function that is applied `chatgpt-shell-models' to determine
526
- which models should be shown in `chatgpt-shell-swap-model' ."
525
+ " Filter models to swap from using this function as a filter.
526
+
527
+ See `chatgpt-shell-allow-model-versions' and
528
+ `chatgpt-shell-ignore-model-versions' as examples."
527
529
:type 'function
528
530
:group 'chatgpt-shell )
529
531
530
532
(defun chatgpt-shell-allow-model-versions (versions )
531
- " Return a predicate that accepts models only if their version
532
- appears in versions. This is intended for use with
533
- `chatgpt-shell-model-filter' ."
533
+ " Return a filter function to keep known model VERSIONS only.
534
+
535
+ Use with `chatgpt-shell-model-filter' ."
534
536
(lambda (models )
535
537
(seq-filter (lambda (model )
536
538
(member (map-elt model :version ) versions))
537
539
models)))
538
540
539
541
(defun chatgpt-shell-ignore-model-versions (versions )
540
- " A predicate intended for use with `chatgpt-shell- model-filter' to
541
- allow model versions specified in
542
- `chatgpt-shell-ignored- model-versions ' ."
542
+ " Return a filter function to drop model VERSIONS.
543
+
544
+ Use with `chatgpt-shell-model-filter ' ."
543
545
(lambda (models )
544
546
(seq-filter (lambda (model )
545
547
(not (member (map-elt model :version ) versions)))
0 commit comments