Skip to content

Commit 63c95da

Browse files
Defensive code
Co-authored-by: Bob Evans <robert.evans25@gmail.com>
1 parent 900c976 commit 63c95da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/subscribers/langchain/runnable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class LangchainRunnableSubscriber extends AiMonitoringChatSubscriber {
7171
if (response || response === '') {
7272
// Add the response if it is NOT an outgoing
7373
// tool call with no result yet
74-
if (!(response.content === '' && response?.tool_calls?.length > 0)) {
74+
if (!(response?.content === '' && response?.tool_calls?.length > 0)) {
7575
messages.push(response)
7676
}
7777
}

0 commit comments

Comments
 (0)