fix: 修复输出为空问题

This commit is contained in:
chenchun
2025-08-11 16:53:33 +08:00
parent c17c9000a8
commit cfde73d13a
3 changed files with 11 additions and 11 deletions

View File

@@ -73,15 +73,15 @@ public class ThorChatMessage
{
if (value is JsonElement str)
{
if (str.ValueKind == JsonValueKind.Array)
if (str.ValueKind == JsonValueKind.String)
{
Content = value?.ToString();
}
else if (str.ValueKind == JsonValueKind.Array)
{
Contents = JsonSerializer.Deserialize<IList<ThorChatMessageContent>>(value?.ToString());
}
}
else if (value is string strInput)
{
Content = strInput;
}
else
{
Content = value?.ToString();