From 5f29117d14bd6035c559218c8db1f370c6affe62 Mon Sep 17 00:00:00 2001 From: DinoChiesa Date: Mon, 24 Mar 2025 17:14:59 +0000 Subject: [PATCH] fix: handle case where google model lacks description --- chatgpt-shell-google.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chatgpt-shell-google.el b/chatgpt-shell-google.el index d367daa..f8108a8 100644 --- a/chatgpt-shell-google.el +++ b/chatgpt-shell-google.el @@ -94,8 +94,9 @@ supports \"generateContent\". This is used to filter the list of models returned from https://generativelanguage.googleapis.com" (let-alist api-response - (unless (string-match-p (rx (or "discontinued" "deprecated")) .description) - (seq-contains-p .supportedGenerationMethods "generateContent")))) + (and .supportedGenerationMethods + (not (and .description (string-match-p (rx (or "discontinued" "deprecated")) .description))) + (seq-contains-p .supportedGenerationMethods "generateContent")))) (defun chatgpt-shell-google--fetch-model-versions () "Retrieves the list of generative models from the Google API."