File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -119,9 +119,15 @@ the model description needed by chatgpt-shell ."
119
119
(model-cwindow (gethash " inputTokenLimit" model)))
120
120
(let ((model-version (string-remove-prefix " models/" model-name)))
121
121
(let ((model-shortversion (string-remove-prefix " gemini-" model-version))
122
- (model-urlpath (concat " /v1beta/" model-name)))
122
+ (model-urlpath (concat " /v1beta/" model-name))
123
+ ; ; The model descriptor does not stipulate whether grounding is supported.
124
+ ; ; So this logic just checks the name.
125
+ (model-supports-grounding (or
126
+ (string-prefix-p " gemini-1.5" model-version)
127
+ (string-prefix-p " gemini-2.0" model-version))))
123
128
(chatgpt-shell-google-make-model :version model-version
124
129
:short-version model-shortversion
130
+ :grounding-search model-supports-grounding
125
131
:path model-urlpath
126
132
:token-width 4
127
133
:context-window model-cwindow)))))
You can’t perform that action at this time.
0 commit comments