karthink / gptel

A simple LLM client for Emacs
GNU General Public License v3.0
1.53k stars 144 forks source link

Not able to communicate with Gemini API starting with 0.9.5 update #427

Closed vick08 closed 2 weeks ago

vick08 commented 2 weeks ago

When sending a query to Gemini API, I get the following debugger output: Debugger entered--Lisp error: (wrong-type-argument json-value-p :text) json-serialize((:contents [(:role "user" :parts [:text "Hello"])] :safetySettings [(:category "HARM_CATEGORY_HARASSMENT" :threshold "BLOCK_NONE") (:category "HARM_CATEGORY_SEXUALLY_EXPLICIT" :threshold "BLOCK_NONE") (:category "HARM_CATEGORY_DANGEROUS_CONTENT" :threshold "BLOCK_NONE") (:category "HARM_CATEGORY_HATE_SPEECH" :threshold "BLOCK_NONE")] :system_instruction (:parts (:text "You are a large language model living in Emacs and a helpful assistant. Respond concisely.")) :generationConfig (:temperature 1.0)) :null-object nil :false-object :json-false) gptel-curl--get-args((:contents [(:role "user" :parts [:text "Hello"])] :safetySettings [(:category "HARM_CATEGORY_HARASSMENT" :threshold "BLOCK_NONE") (:category "HARM_CATEGORY_SEXUALLY_EXPLICIT" :threshold "BLOCK_NONE") (:category "HARM_CATEGORY_DANGEROUS_CONTENT" :threshold "BLOCK_NONE") (:category "HARM_CATEGORY_HATE_SPEECH" :threshold "BLOCK_NONE")] :system_instruction (:parts (:text "You are a large language model living in Emacs and a helpful assistant. Respond concisely.")) :generationConfig (:temperature 1.0)) "728e19f81869c2569fe9756e89dac32f") gptel-curl-get-response((:data (:contents [(:role "user" :parts [:text "Hello"])] :safetySettings [(:category "HARM_CATEGORY_HARASSMENT" :threshold "BLOCK_NONE") (:category "HARM_CATEGORY_SEXUALLY_EXPLICIT" :threshold "BLOCK_NONE") (:category "HARM_CATEGORY_DANGEROUS_CONTENT" :threshold "BLOCK_NONE") (:category "HARM_CATEGORY_HATE_SPEECH" :threshold "BLOCK_NONE")] :system_instruction (:parts (:text "You are a large language model living in Emacs and a helpful assistant. Respond concisely.")) :generationConfig (:temperature 1.0)) :buffer #<buffer Gemini> :position #<marker at 11 in Gemini>) nil) gptel-request(nil :stream t) gptel-send(nil)

(gptel-send nil)

apply(# gptel-send nil) ad-Advice-funcall-interactively(# gptel-send nil) apply(ad-Advice-funcall-interactively # (gptel-send nil)) funcall-interactively(gptel-send nil) call-interactively(gptel-send nil nil) command-execute(gptel-send)

karthink commented 2 weeks ago

It's been fixed, please see #422 and update gptel. You can reopen this if the issue persists.