feat: 完成多message存储
This commit is contained in:
@@ -90,6 +90,28 @@ public class ThorChatMessage
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用于数据存储
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public string MessagesStore
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Content is not null)
|
||||
{
|
||||
return Content;
|
||||
}
|
||||
|
||||
if (Contents is not null && Contents.Any())
|
||||
{
|
||||
return JsonSerializer.Serialize(Contents);
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 【可选】参与者的可选名称。提供模型信息以区分相同角色的参与者。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user