From 19ff023dd8a3c086fadf63145f430bcdb314a56d Mon Sep 17 00:00:00 2001 From: JenChieh Date: Sun, 11 Feb 2024 04:41:14 -0800 Subject: [PATCH] simplify headers --- google-gemini.el | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/google-gemini.el b/google-gemini.el index 309b3f3..769e78d 100644 --- a/google-gemini.el +++ b/google-gemini.el @@ -99,16 +99,7 @@ If BASE-URL is not specified, it defaults to `google-gemini-base-url'." Arguments CONTENT-TYPE are common request headers." (google-gemini--alist-omit-null - `(("Content-Type" . ,content-type) - ,(if (or (null key) - (string-empty-p key)) - "" - (pcase openai-key-type - (:bearer `("Authorization" . ,(concat "Bearer " key))) - (:azure-api `("api-key" . ,key)) - (_ (user-error "Invalid key type: %s" - openai-key-type)))) - ))) + `(("Content-Type" . ,content-type)))) (defun google-gemini--json-encode (object) "Wrapper for function `json-encode' but it remove nil value before