[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/llm 9a9b0de0df 52/71: Add llm-request-plz-connect-timeo
From: |
ELPA Syncer |
Subject: |
[elpa] externals/llm 9a9b0de0df 52/71: Add llm-request-plz-connect-timeout |
Date: |
Fri, 17 May 2024 00:58:48 -0400 (EDT) |
branch: externals/llm
commit 9a9b0de0df67a68456e57b62d37d27ec67af91e4
Author: Roman Scherer <roman@burningswell.com>
Commit: Roman Scherer <roman@burningswell.com>
Add llm-request-plz-connect-timeout
---
llm-request-plz.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/llm-request-plz.el b/llm-request-plz.el
index 8d7b9a94cd..2a3665eb2b 100644
--- a/llm-request-plz.el
+++ b/llm-request-plz.el
@@ -39,6 +39,11 @@ not very long so that we can end stuck requests."
:type 'integer
:group 'llm)
+(defcustom llm-request-plz-connect-timeout 10
+ "The number of seconds to wait for a connection to a HTTP server."
+ :type 'integer
+ :group 'llm)
+
(defun llm-request-success (status)
"Return non-nil if STATUS is a successful HTTP status code."
(<= 200 status 299))
@@ -59,6 +64,7 @@ TIMEOUT is the number of seconds to wait for a response."
:as `(media-types ,plz-media-types)
:body (when data
(encode-coding-string (json-encode data) 'utf-8))
+ :connect-timeout llm-request-plz-connect-timeout
:headers (append headers '(("Content-Type" . "application/json")))
:timeout (or timeout llm-request-plz-timeout))))
(if (llm-request-success (plz-response-status resp))
@@ -141,6 +147,7 @@ only used by other methods in this file."
plz-media-types))
:body (when data
(encode-coding-string (json-encode data) 'utf-8))
+ :connect-timeout llm-request-plz-connect-timeout
:headers (append headers
'(("Content-Type" . "application/json")))
:then (lambda (response)
- [elpa] externals/llm 5bb3dadf25 17/71: Handle empty choices, (continued)
- [elpa] externals/llm 5bb3dadf25 17/71: Handle empty choices, ELPA Syncer, 2024/05/17
- [elpa] externals/llm 2a0651adc2 22/71: Merge pull request #29 from r0man/plz, ELPA Syncer, 2024/05/17
- [elpa] externals/llm 27884dcb32 27/71: Port ollama to plz, ELPA Syncer, 2024/05/17
- [elpa] externals/llm 2ea07f9197 25/71: Merge pull request #30 from r0man/plz-event-type-symbol, ELPA Syncer, 2024/05/17
- [elpa] externals/llm 623bceda67 29/71: Fix issue with JSON array parser nor emitting all objects, ELPA Syncer, 2024/05/17
- [elpa] externals/llm 385ce9cdac 32/71: Use the streaming endpoint for the Vertex provider, ELPA Syncer, 2024/05/17
- [elpa] externals/llm 1fb8511867 36/71: Use media type only in the llm-request-plz-async call, ELPA Syncer, 2024/05/17
- [elpa] externals/llm 5623482527 37/71: Fix error handling in Gemini and Vertex provider, ELPA Syncer, 2024/05/17
- [elpa] externals/llm 669456cba5 43/71: Fix Ollama error handling and appending to prompt, ELPA Syncer, 2024/05/17
- [elpa] externals/llm c26bf648a8 44/71: Increase llm-request-plz-timeout to 2 minutes, ELPA Syncer, 2024/05/17
- [elpa] externals/llm 9a9b0de0df 52/71: Add llm-request-plz-connect-timeout,
ELPA Syncer <=
- [elpa] externals/llm 5145074ba0 57/71: Merge branch 'main' into plz, ELPA Syncer, 2024/05/17
- [elpa] externals/llm dda5d1f2d0 62/71: Call handler functions only with the event object, ELPA Syncer, 2024/05/17
- [elpa] externals/llm 2146ba3803 64/71: Change some function names and make most of them private (#42), ELPA Syncer, 2024/05/17
- [elpa] externals/llm 3a2d6962f3 67/71: Whitespace fixes, ELPA Syncer, 2024/05/17
- [elpa] externals/llm 29d7c3f6b8 55/71: Update media type and event source packages, ELPA Syncer, 2024/05/17
- [elpa] externals/llm 0f25d08218 66/71: Merge branch 'plz', ELPA Syncer, 2024/05/17
- [elpa] externals/llm 478afbcb41 71/71: Fix byte compilation errors, ELPA Syncer, 2024/05/17
- [elpa] externals/llm b438ae7a72 46/71: Merge pull request #35 from r0man/plz, ELPA Syncer, 2024/05/17
- [elpa] externals/llm 7b2c89f087 41/71: Remove invalid media type usage and on-success-raw callback, ELPA Syncer, 2024/05/17
- [elpa] externals/llm ccfe066654 45/71: Widen before parsing the response, ELPA Syncer, 2024/05/17