[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/llm c93a836437 1/2: Fix mapconcat uses that only work i
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/llm c93a836437 1/2: Fix mapconcat uses that only work in Emacs 29 |
|
Date: |
Sat, 4 Nov 2023 21:58:23 -0400 (EDT) |
branch: externals/llm
commit c93a836437761331c824b8891b77d382b902138a
Author: Andrew Hyatt <ahyatt@gmail.com>
Commit: Andrew Hyatt <ahyatt@gmail.com>
Fix mapconcat uses that only work in Emacs 29
The last mapconcat argument (the separator), used to not be optional
pre-Emacs
29, so to maintain compatability we need to always supply it.
This fixes https://github.com/s-kostyaev/ellama/issues/9.
---
NEWS.org | 2 ++
llm-ollama.el | 2 +-
llm-openai.el | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/NEWS.org b/NEWS.org
index dac773075a..5b30f7beec 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -1,3 +1,5 @@
+* Version 0.5.2
+- Fix incompatibility with older Emacs introduced in Version 0.5.1.
* Version 0.5.1
- Implement token counting for Google Cloud Vertex via their API.
- Fix issue with Google Cloud Vertex erroring on multibyte strings.
diff --git a/llm-ollama.el b/llm-ollama.el
index b36cf8c653..ca5f1e91c3 100644
--- a/llm-ollama.el
+++ b/llm-ollama.el
@@ -163,7 +163,7 @@ STREAMING if non-nil, turn on response streaming."
;; Take from response output last-response to the end.
This
;; counts only valid responses, so we need to throw out
all
;; other lines that aren't valid JSON.
- (seq-subseq all-lines last-response))))
+ (seq-subseq all-lines last-response) "")))
(setq last-response (length all-lines))))))
;; If there is no new content, don't manipulate anything.
(when (> (length current-response) (length llm-ollama-current-response))
diff --git a/llm-openai.el b/llm-openai.el
index a55dadc4a0..a9e802a93c 100644
--- a/llm-openai.el
+++ b/llm-openai.el
@@ -224,7 +224,7 @@ them from 1 to however many are sent.")
(json-read-from-string
(replace-regexp-in-string "data: " "" line)))
0))))
- (seq-subseq all-lines last-response))))
+ (seq-subseq all-lines last-response) "")))
(setq last-response (length all-lines))))))
(when (> (length current-response) (length llm-openai-current-response))
(setq llm-openai-current-response current-response)