[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gptel 4e35e998a8 014/273: gptel-curl: Rename functions for
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gptel 4e35e998a8 014/273: gptel-curl: Rename functions for linting |
Date: |
Wed, 1 May 2024 10:01:26 -0400 (EDT) |
branch: elpa/gptel
commit 4e35e998a81a431c80081407212ac6f7d3390834
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
gptel-curl: Rename functions for linting
gptel-curl.el (gptel-curl--process-alist, gptel-curl--get-args,
gptel--curl-sentinel, gptel-curl--parse-response): Rename internal
functions and variables to use the `gptel-curl--` prefix instead of
`gptel--curl-`.
---
gptel-curl.el | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/gptel-curl.el b/gptel-curl.el
index 3ccfdb3d46..7953790b80 100644
--- a/gptel-curl.el
+++ b/gptel-curl.el
@@ -34,10 +34,10 @@
(require 'json)
(require 'aio)
-(defvar gptel--curl-process-alist nil
+(defvar gptel-curl--process-alist nil
"Alist of active GPTel curl requests.")
-(defun gptel--curl-get-args (prompts token)
+(defun gptel-curl--get-args (prompts token)
"Produce list of arguments for calling Curl.
PROMPTS is the data to send, TOKEN is a unique identifier."
@@ -72,36 +72,36 @@ PROMPTS is the data to send, TOKEN is a unique identifier."
(let* ((token (md5 (format "%s%s%s%s"
(random) (emacs-pid) (user-full-name)
(recent-keys))))
- (args (gptel--curl-get-args prompts token))
+ (args (gptel-curl--get-args prompts token))
(process (apply #'start-process "gptel-curl" (current-buffer)
"curl" args))
(promise (aio-promise))
(cb (lambda (result)
(aio-resolve promise (lambda () result))
(setf (alist-get process
- gptel--curl-process-alist nil 'remove)
+ gptel-curl--process-alist nil 'remove)
nil))))
(prog1 promise
(set-process-query-on-exit-flag process nil)
- (setf (alist-get process gptel--curl-process-alist)
+ (setf (alist-get process gptel-curl--process-alist)
(list :callback cb :token token))
- (set-process-sentinel process #'gptel--curl-sentinel)))))
+ (set-process-sentinel process #'gptel-curl--sentinel)))))
-(defun gptel--curl-sentinel (process status)
+(defun gptel-curl--sentinel (process status)
"Process sentinel for GPTel curl requests.
PROCESS and STATUS are process parameters."
(let ((proc-buf (process-buffer process)))
(if-let* ((ok-p (equal status "finished\n"))
- (proc-info (alist-get process gptel--curl-process-alist))
+ (proc-info (alist-get process gptel-curl--process-alist))
(proc-token (plist-get proc-info :token))
- (content (gptel--curl-parse-response proc-buf proc-token)))
+ (content (gptel-curl--parse-response proc-buf proc-token)))
(funcall (plist-get proc-info :callback) content)
;; Failed
(funcall (plist-get proc-info :callback) nil))
(kill-buffer proc-buf)))
-(defun gptel--curl-parse-response (buf token)
+(defun gptel-curl--parse-response (buf token)
"Parse the buffer BUF with curl's response.
TOKEN is used to disambiguate multiple requests in a single
- [nongnu] elpa/gptel 2b938114cf 264/273: gptel: Add GPT 4 Turbo (#286), (continued)
- [nongnu] elpa/gptel 2b938114cf 264/273: gptel: Add GPT 4 Turbo (#286), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 44feb1637f 267/273: gptel-transient: Update header-line in gptel--suffix-send, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel f98293f004 016/273: gptel: Check header-line-format before updating, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 3f7c81012b 015/273: gptel: Bump version and prepare for transient menus, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 9da22155de 025/273: gptel-transient: Fix autoloads for gptel-send-menu, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel a3109a4b68 022/273: gptel: Insert response below point, not at point-max, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel a673f54a3e 024/273: gptel, gptel-curl: Handle missing API key, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 1e31f550de 165/273: gptel: Declare compat as explicit dependency, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 48047c0600 167/273: gptel-transient: Improve system-message edit buffer, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 5159a773a0 011/273: gptel: Use text-property based delimiting, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 4e35e998a8 014/273: gptel-curl: Rename functions for linting,
ELPA Syncer <=
- [nongnu] elpa/gptel 1ada9c9214 031/273: gptel: Handle insertion with region-active correctly, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel d77c8f37c5 057/273: gptel: Improve header-line-format, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 6419e8f021 120/273: gptel: Add multi-llm support, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel aa50cbab70 123/273: gptel: Bump version, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel c97778d5a8 127/273: gptel: address byte-compile and checkdoc warnings, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 3e361323d5 137/273: Update available OpenAI GPT models to match API (#146), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 32dd463bd6 160/273: README: Mention YouTube demo, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 3ac5963080 168/273: README: Add instructions for Llamafile, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel bea31e33e2 175/273: gptel-ollama: Use default host in gptel-make-ollama, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel c6a07043af 179/273: gptel-kagi: Add support for Kagi FastGPT, ELPA Syncer, 2024/05/01