branch: externals/llm
commit 93d74e0ebcea798959f417dd7254a0d38f5409b8
Author: Andrew Hyatt <[email protected]>
Commit: GitHub <[email protected]>
Fix for running tools in the original buffer with streaming (#235)
This fixes https://github.com/ahyatt/llm/issues/231
---
NEWS.org | 2 ++
llm-provider-utils.el | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/NEWS.org b/NEWS.org
index d5b5c10f61..185b652697 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -1,3 +1,5 @@
+* Version 0.28.5
+- Fix for running tools in the original buffer with streaming
* Version 0.28.4
- Removed bad interactions made in Ollama tool calls
- Fixed Ollama tool calling requests
diff --git a/llm-provider-utils.el b/llm-provider-utils.el
index 07dbe208a2..da3f349560 100644
--- a/llm-provider-utils.el
+++ b/llm-provider-utils.el
@@ -447,7 +447,8 @@ Any strings will be concatenated, integers will be added,
etc."
(lambda (_)
;; We don't need the data at the end of streaming, so we can ignore it.
(with-current-buffer (if (buffer-live-p buf)
- (generate-new-buffer " *llm-temp*" t))
+ buf
+ (generate-new-buffer " *llm-temp*" t))
(llm-provider-utils-process-result
provider prompt
(llm-provider-utils-streaming-accumulate