emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/gptel ff3c8e8df9 2/2: gptel: Lint backend files


From: ELPA Syncer
Subject: [nongnu] elpa/gptel ff3c8e8df9 2/2: gptel: Lint backend files
Date: Thu, 26 Sep 2024 04:00:34 -0400 (EDT)

branch: elpa/gptel
commit ff3c8e8df953a25fecbcd9e8b31ea48d02712739
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>

    gptel: Lint backend files
    
    * gptel-openai.el (gptel-make-azure, gptel-make-openai): Linting.
    
    * gptel-ollama.el (gptel-make-ollama): Linting.
    
    * gptel-kagi.el (gptel-make-kagi): Linting.
    
    * gptel-gemini.el (gptel-make-gemini): Linting.
    
    * gptel-anthropic.el (gptel-make-anthropic): Linting.
---
 gptel-anthropic.el |  6 +++---
 gptel-gemini.el    |  4 ++--
 gptel-kagi.el      |  4 ++--
 gptel-ollama.el    | 12 ++++++------
 gptel-openai.el    | 29 ++++++++++++++++-------------
 5 files changed, 29 insertions(+), 26 deletions(-)

diff --git a/gptel-anthropic.el b/gptel-anthropic.el
index 0abc667c9c..130ddd0182 100644
--- a/gptel-anthropic.el
+++ b/gptel-anthropic.el
@@ -138,9 +138,9 @@ ENDPOINT (optional) is the API endpoint for completions, 
defaults to
 \"/v1/messages\".
 
 HEADER (optional) is for additional headers to send with each
-request. It should be an alist or a function that retuns an
+request.  It should be an alist or a function that retuns an
 alist, like:
-((\"Content-Type\" . \"application/json\"))
+ ((\"Content-Type\" . \"application/json\"))
 
 KEY is a variable whose value is the API key, or function that
 returns the key."
@@ -164,4 +164,4 @@ returns the key."
                   backend))))
 
 (provide 'gptel-anthropic)
-;;; gptel-backends.el ends here
+;;; gptel-anthropic.el ends here
diff --git a/gptel-gemini.el b/gptel-gemini.el
index 8b7d1ba6ae..43f576ea20 100644
--- a/gptel-gemini.el
+++ b/gptel-gemini.el
@@ -148,9 +148,9 @@ ENDPOINT (optional) is the API endpoint for completions, 
defaults to
 \"/v1beta/models\".
 
 HEADER (optional) is for additional headers to send with each
-request. It should be an alist or a function that retuns an
+request.  It should be an alist or a function that retuns an
 alist, like:
-((\"Content-Type\" . \"application/json\"))
+ ((\"Content-Type\" . \"application/json\"))
 
 KEY (optional) is a variable whose value is the API key, or
 function that returns the key."
diff --git a/gptel-kagi.el b/gptel-kagi.el
index 4d5b7b23a3..0069477ed9 100644
--- a/gptel-kagi.el
+++ b/gptel-kagi.el
@@ -163,7 +163,7 @@ ENDPOINT (optional) is the API endpoint for completions, 
defaults to
 HEADER (optional) is for additional headers to send with each
 request.  It should be an alist or a function that retuns an
 alist, like:
-((\"Content-Type\" . \"application/json\"))
+ ((\"Content-Type\" . \"application/json\"))
 
 KEY (optional) is a variable whose value is the API key, or
 function that returns the key.
@@ -171,7 +171,7 @@ function that returns the key.
 Example:
 -------
 
-(gptel-make-kagi \"Kagi\" :key my-kagi-key)"
+ (gptel-make-kagi \"Kagi\" :key my-kagi-key)"
   (declare (indent 1))
   stream                                ;Silence byte-compiler
   (let ((backend (gptel--make-kagi
diff --git a/gptel-ollama.el b/gptel-ollama.el
index b3ef7993c9..f14cb5704a 100644
--- a/gptel-ollama.el
+++ b/gptel-ollama.el
@@ -154,7 +154,7 @@ ENDPOINT (optional) is the API endpoint for completions, 
defaults to
 HEADER (optional) is for additional headers to send with each
 request.  It should be an alist or a function that retuns an
 alist, like:
-((\"Content-Type\" . \"application/json\"))
+ ((\"Content-Type\" . \"application/json\"))
 
 KEY (optional) is a variable whose value is the API key, or
 function that returns the key.  This is typically not required
@@ -163,11 +163,11 @@ for local models like Ollama.
 Example:
 -------
 
-(gptel-make-ollama
-  \"Ollama\"
-  :host \"localhost:11434\"
-  :models \\='(\"mistral:latest\")
-  :stream t)"
+ (gptel-make-ollama
+   \"Ollama\"
+   :host \"localhost:11434\"
+   :models \\='(\"mistral:latest\")
+   :stream t)"
   (declare (indent 1))
   (let ((backend (gptel--make-ollama
                   :curl-args curl-args
diff --git a/gptel-openai.el b/gptel-openai.el
index beb252b243..dacf2af990 100644
--- a/gptel-openai.el
+++ b/gptel-openai.el
@@ -36,6 +36,9 @@
 (defvar gptel--system-message)
 (defvar json-object-type)
 
+(defvar gptel-mode)
+(defvar gptel-track-response)
+(declare-function gptel--trim-prefixes "gptel")
 (declare-function gptel--get-api-key "gptel")
 (declare-function prop-match-value "text-property-search")
 (declare-function text-property-search-backward "text-property-search")
@@ -187,9 +190,9 @@ ENDPOINT (optional) is the API endpoint for completions, 
defaults to
 \"/v1/chat/completions\".
 
 HEADER (optional) is for additional headers to send with each
-request. It should be an alist or a function that retuns an
+request.  It should be an alist or a function that retuns an
 alist, like:
-((\"Content-Type\" . \"application/json\"))
+ ((\"Content-Type\" . \"application/json\"))
 
 KEY (optional) is a variable whose value is the API key, or
 function that returns the key."
@@ -238,9 +241,9 @@ PROTOCOL (optional) specifies the protocol, https by 
default.
 ENDPOINT is the API endpoint for completions.
 
 HEADER (optional) is for additional headers to send with each
-request. It should be an alist or a function that retuns an
+request.  It should be an alist or a function that retuns an
 alist, like:
-((\"Content-Type\" . \"application/json\"))
+ ((\"Content-Type\" . \"application/json\"))
 
 KEY (optional) is a variable whose value is the API key, or
 function that returns the key.
@@ -248,14 +251,14 @@ function that returns the key.
 Example:
 -------
 
-(gptel-make-azure
- \"Azure-1\"
- :protocol \"https\"
- :host \"RESOURCE_NAME.openai.azure.com\"
- :endpoint
- \"/openai/deployments/DEPLOYMENT_NAME/completions?api-version=2023-05-15\"
- :stream t
- :models \\='(\"gpt-3.5-turbo\" \"gpt-4\"))"
+ (gptel-make-azure
+  \"Azure-1\"
+  :protocol \"https\"
+  :host \"RESOURCE_NAME.openai.azure.com\"
+  :endpoint
+  \"/openai/deployments/DEPLOYMENT_NAME/completions?api-version=2023-05-15\"
+  :stream t
+  :models \\='(\"gpt-3.5-turbo\" \"gpt-4\"))"
   (declare (indent 1))
   (let ((backend (gptel--make-openai
                   :curl-args curl-args
@@ -315,4 +318,4 @@ Example:
  :models \\='(\"mistral-7b-openorca.Q4_0.gguf\"))")
 
 (provide 'gptel-openai)
-;;; gptel-backends.el ends here
+;;; gptel-openai.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]