Skip to content

Commit 61f5adc

Browse files
committed
fix: make sure function call is omitted when empty
1 parent 5cd4037 commit 61f5adc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Cnblogs.DashScope.AI/DashScopeChatClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ private IEnumerable<TextChatMessage> ToTextChatMessages(
464464
from.Text ?? string.Empty,
465465
from.AuthorName,
466466
null,
467-
functionCall);
467+
functionCall.Count > 0 ? functionCall : null);
468468
}
469469
}
470470

0 commit comments

Comments
 (0)