[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gptel 86bf0c9f74 004/273: gptel: Avoid logging url-retriev
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gptel 86bf0c9f74 004/273: gptel: Avoid logging url-retrieve messages |
Date: |
Wed, 1 May 2024 10:01:25 -0400 (EDT) |
branch: elpa/gptel
commit 86bf0c9f74a6f83eaae2c82b22f368f0004d7e48
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
gptel: Avoid logging url-retrieve messages
- Use `read-passwd' to read the API key.
---
gptel.el | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/gptel.el b/gptel.el
index ec2a1a032c..3fbec9ca8c 100644
--- a/gptel.el
+++ b/gptel.el
@@ -134,10 +134,12 @@ Return the response buffer."
;; :temperature 1.0
;; :top_p 1.0
:messages [,@prompts]))))
- (pcase-let ((`(,_ . ,buffer)
- (aio-await
- (aio-url-retrieve
"https://api.openai.com/v1/chat/completions"))))
- buffer)))
+ (let ((inhibit-message t)
+ (message-log-max nil))
+ (pcase-let ((`(,_ . ,buffer)
+ (aio-await
+ (aio-url-retrieve
"https://api.openai.com/v1/chat/completions"))))
+ buffer))))
;;;###autoload
(define-minor-mode gptel-mode
@@ -160,11 +162,17 @@ Ask for API-KEY if `gptel-api-key' is unset."
(read-string "Session name: "
(generate-new-buffer-name gptel-default-session))
gptel-default-session)
(or gptel-api-key
- (read-string "OpenAI API key: "))))
+ (setq gptel-api-key
+ (read-passwd "OpenAI API key: ")))))
(unless api-key
(user-error "No API key available"))
(with-current-buffer (get-buffer-create name)
- (unless (eq major-mode gptel-default-mode) (funcall gptel-default-mode))
+ (cond ;Set major mode
+ ((eq major-mode gptel-default-mode))
+ ((eq gptel-default-mode 'text-mode)
+ (text-mode)
+ (visual-line-mode 1))
+ (t (funcall gptel-default-mode)))
(unless gptel-mode (gptel-mode 1))
(if (bobp) (insert gptel-prompt-string))
(pop-to-buffer (current-buffer))
- [nongnu] branch elpa/gptel created (now 97ab6cbd1e), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 99aa8dcc5f 001/273: Add gptel.el and a README., ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel deeb606409 003/273: Update license., ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 88995a6436 007/273: gptel-curl: Add curl module and playback feature., ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel cf6999ac12 002/273: Fix byte-compile warnings, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel cd6d90b24d 026/273: gptel-transient: Improve "send in existing/new session" option, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 8fca5bc762 019/273: gptel: Add org-mode support and update README, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 8a6ef565f0 033/273: gptel-transient: Remove unused lexical vars, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 86bf0c9f74 004/273: gptel: Avoid logging url-retrieve messages,
ELPA Syncer <=
- [nongnu] elpa/gptel de70a066d7 017/273: gptel: Pulse inserted text, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 65e6d73372 013/273: gptel: Include more API parameters, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 0d26b34526 029/273: gptel: Add a debug flag, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 6f951ed690 037/273: Add gptel-api-key-from-auth-source (Fix #13), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 4f3ca23454 040/273: gptel: Update commentary and README, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 9f8a984729 038/273: gptel: Change how api-key is read, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 9b3db255e8 049/273: gptel: Turn API parameters into defcustoms, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel a5fe30312f 005/273: gptel: Fix spacing issues in response, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 3c10147a72 009/273: gptel: Tweak README, minor linting, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 77d1010fbc 010/273: gptel-curl: Add package version, ELPA Syncer, 2024/05/01