branch: externals/llm
commit 8c713983f04a9e8aa36c42471203edf85d0ee137
Author: Andrew Hyatt <ahy...@gmail.com>
Commit: GitHub <nore...@github.com>

    Only collect streaming function data when we have function calls (#66)
    
    This means that we don't have to worry about
    `llm-provider-colelct-streaming-function-data` having to worry about results
    that contain no function calls.
---
 llm-provider-utils.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/llm-provider-utils.el b/llm-provider-utils.el
index 237d0b4d0e..eadd596b98 100644
--- a/llm-provider-utils.el
+++ b/llm-provider-utils.el
@@ -323,8 +323,9 @@ return a list of `llm-chat-function-call' structs.")
         (llm-provider-utils-process-result
          provider prompt
          current-text
-         (llm-provider-collect-streaming-function-data
-          provider (nreverse fc)))))
+         (when fc
+           (llm-provider-collect-streaming-function-data
+            provider (nreverse fc))))))
      :on-error (lambda (_ data)
                  (llm-provider-utils-callback-in-buffer
                   buf error-callback 'error

Reply via email to