branch: externals/llm commit 6ca165b43770fe9c6e730f2d43d3322a80ddb431 Author: Andrew Hyatt <ahy...@gmail.com> Commit: GitHub <nore...@github.com>
Fix issue in Ollama when passing non-standard params (#169) This was introduced in the recent change to handle the `keep-alive` option separately. This fixes https://github.com/ahyatt/llm/issues/168. --- NEWS.org | 2 ++ llm-ollama.el | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS.org b/NEWS.org index a32d1b58b4..d02a7f7576 100644 --- a/NEWS.org +++ b/NEWS.org @@ -1,3 +1,5 @@ +* Version 0.24.1 +- Fix issue with Ollama incorrect requests when passing non-standard params. * Version 0.24.0 - Add =multi-output= as an option, allowing all llm results to return, call, or stream multiple kinds of data via a plist. This allows separating out reasoning, as well as optionally returning text as well as tool uses at the same time. - Added ~llm-models~ to get a list of models from a provider. diff --git a/llm-ollama.el b/llm-ollama.el index 87fdbdddf9..4b34153388 100644 --- a/llm-ollama.el +++ b/llm-ollama.el @@ -184,8 +184,9 @@ PROVIDER is the llm-ollama provider." (when-let* ((keep-alive (plist-get more-options-plist :keep_alive))) (setq request-plist (plist-put request-plist :keep_alive keep-alive))) (setq options (append options - (map-filter (lambda (key _) (not (equal key :keep_alive))) - more-options-plist)))) + (map-into (map-filter (lambda (key _) (not (equal key :keep_alive))) + more-options-plist) + 'plist)))) (when options (setq request-plist (plist-put request-plist :options options))) request-plist))