[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ellama 904959ddfd 4/8: Add `:provider` keyword to strin
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ellama 904959ddfd 4/8: Add `:provider` keyword to string list extraction functions |
Date: |
Sun, 26 Jan 2025 15:58:25 -0500 (EST) |
branch: externals/ellama
commit 904959ddfd6ce483f5126224ca205a197bd79173
Author: Sergey Kostyaev <sskostyaev@gmail.com>
Commit: Sergey Kostyaev <sskostyaev@gmail.com>
Add `:provider` keyword to string list extraction functions
Enhance `ellama-extract-string-list` and
`ellama-extract-string-list-async`. Added support for optional
arguments in both functions to allow fine control over the extraction
process. Introduced new keyword argument `:provider` to specify an LLM
provider for generation, defaulting to existing providers if not
specified.
---
ellama.el | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/ellama.el b/ellama.el
index bbe782a3e1..d8d508a36b 100644
--- a/ellama.el
+++ b/ellama.el
@@ -2206,10 +2206,14 @@ otherwise prompt user for URL to summarize."
(:data (:type array :items (:type string)))
:required (data))))
-(defun ellama-extract-string-list (elements input)
+(defun ellama-extract-string-list (elements input &rest args)
"Extract list of ELEMENTS from INPUT syncronously.
-Return list of strings."
- (let ((provider (or ellama-extraction-provider ellama-provider)))
+Return list of strings. ARGS contains keys for fine control.
+
+:provider PROVIDER -- PROVIDER is an llm provider for generation."
+ (let ((provider (or (plist-get args :provider)
+ ellama-extraction-provider
+ ellama-provider)))
(plist-get (json-parse-string
(llm-chat
provider
@@ -2218,10 +2222,14 @@ Return list of strings."
:array-type 'list)
:data)))
-(defun ellama-extract-string-list-async (elements callback input)
+(defun ellama-extract-string-list-async (elements callback input &rest args)
"Extract list of ELEMENTS from INPUT asyncronously.
-Call CALLBACK on result list of strings."
- (let ((provider (or ellama-extraction-provider ellama-provider)))
+Call CALLBACK on result list of strings. ARGS contains keys for fine control.
+
+:provider PROVIDER -- PROVIDER is an llm provider for generation."
+ (let ((provider (or (plist-get args :provider)
+ ellama-extraction-provider
+ ellama-provider)))
(llm-chat-async
provider
(ellama--make-extract-string-list-prompt elements input)
- [elpa] externals/ellama updated (f584f115ea -> 77ad1e2c38), ELPA Syncer, 2025/01/26
- [elpa] externals/ellama a4c06eab18 2/8: Add on-done callback to ellama-instant, ELPA Syncer, 2025/01/26
- [elpa] externals/ellama 5f0abf990b 1/8: Add data extraction features, ELPA Syncer, 2025/01/26
- [elpa] externals/ellama dc54d4dc65 6/8: Add `ellama-extraction-provider` to documentation, ELPA Syncer, 2025/01/26
- [elpa] externals/ellama 0fdcf47e20 5/8: Improve docstrings, ELPA Syncer, 2025/01/26
- [elpa] externals/ellama 904959ddfd 4/8: Add `:provider` keyword to string list extraction functions,
ELPA Syncer <=
- [elpa] externals/ellama 77ad1e2c38 8/8: Bump version, ELPA Syncer, 2025/01/26
- [elpa] externals/ellama f9e7191500 7/8: Merge pull request #187 from s-kostyaev/add-data-extraction, ELPA Syncer, 2025/01/26
- [elpa] externals/ellama 8be52ac5a1 3/8: Update required llm library version, ELPA Syncer, 2025/01/26