Skip to content

Commit 1684a8a

Browse files
committed
chore: add comments of error
1 parent 61f5adc commit 1684a8a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Cnblogs.DashScope.AI/DashScopeChatClient.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,9 @@ private IEnumerable<TextChatMessage> ToTextChatMessages(
459459
tools?.FindIndex(f => f.Function?.Name == c.Name) ?? -1,
460460
new FunctionCall(c.Name, JsonSerializer.Serialize(c.Arguments, ToolCallJsonSerializerOptions))))
461461
.ToList();
462+
463+
// function all array must be null when empty
464+
// <400> InternalError.Algo.InvalidParameter: Empty tool_calls is not supported in message
462465
yield return new TextChatMessage(
463466
from.Role.Value,
464467
from.Text ?? string.Empty,

0 commit comments

Comments
 (0)