@@ -521,7 +521,7 @@ Downloaded from https://github.com/f/awesome-chatgpt-prompts."
521
521
(setq chatgpt-shell-models (chatgpt-shell--make-default-models))
522
522
(message " Reloaded %d models " (length chatgpt-shell-models)))
523
523
524
- (defcustom chatgpt-shell-model-filter nil
524
+ (defcustom chatgpt-shell-swap- model-filter nil
525
525
" Filter models to swap from using this function as a filter.
526
526
527
527
See `chatgpt-shell-allow-model-versions' and
@@ -547,7 +547,7 @@ See also `chatgpt-shell-swap-model'."
547
547
(defun chatgpt-shell-allow-model-versions (versions )
548
548
" Return a filter function to keep known model VERSIONS only.
549
549
550
- Use with `chatgpt-shell-model-filter' ."
550
+ Use with `chatgpt-shell-swap- model-filter' ."
551
551
(lambda (models )
552
552
(seq-filter (lambda (model )
553
553
(member (map-elt model :version ) versions))
@@ -556,7 +556,7 @@ Use with `chatgpt-shell-model-filter'."
556
556
(defun chatgpt-shell-ignore-model-versions (versions )
557
557
" Return a filter function to drop model VERSIONS.
558
558
559
- Use with `chatgpt-shell-model-filter' ."
559
+ Use with `chatgpt-shell-swap- model-filter' ."
560
560
(lambda (models )
561
561
(seq-filter (lambda (model )
562
562
(not (member (map-elt model :version ) versions)))
@@ -568,6 +568,9 @@ Use with `chatgpt-shell-model-filter'."
568
568
To select a model, it uses `chatgpt-shell-swap-model-selector' if
569
569
non-nil; otherwise `completing-read' ."
570
570
(interactive )
571
+ (when (and (boundp 'chatgpt-shell-model-filter )
572
+ chatgpt-shell-model-filter)
573
+ (user-error " chatgpt-shell-model-filter is now retired. Please use chatgpt-shell-swap-model-filter" ))
571
574
(if-let* ((last-label (chatgpt-shell--model-label))
572
575
(width (let ((width))
573
576
(mapc (lambda (model )
@@ -583,8 +586,8 @@ non-nil; otherwise `completing-read'."
583
586
(format (format " %% -%d s %% s" width)
584
587
(map-elt model :provider )
585
588
(map-elt model :version )))
586
- (if chatgpt-shell-model-filter
587
- (funcall chatgpt-shell-model-filter chatgpt-shell-models)
589
+ (if chatgpt-shell-swap- model-filter
590
+ (funcall chatgpt-shell-swap- model-filter chatgpt-shell-models)
588
591
chatgpt-shell-models)))
589
592
(selection (nth 1 (split-string (if chatgpt-shell-swap-model-selector
590
593
(funcall chatgpt-shell-swap-model-selector models)
0 commit comments