mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-23 02:06:36 +08:00
refactor: 移除代码补全兼容逻辑并优化 DTO 可空类型处理
This commit is contained in:
@@ -51,16 +51,17 @@ public class ThorChatMessage
|
||||
|
||||
/// <summary>
|
||||
/// 发出的消息内容计算,用于json序列号和反序列化,Content 和 Contents 不能同时赋值,只能二选一
|
||||
/// 如果是工具调用,还真可能为空
|
||||
/// </summary>
|
||||
[JsonPropertyName("content")]
|
||||
public object ContentCalculated
|
||||
public object? ContentCalculated
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Content is not null && Contents is not null)
|
||||
{
|
||||
throw new ValidationException("Messages 中 Content 和 Contents 字段不能同时有值");
|
||||
}
|
||||
// if (Content is not null && Contents is not null)
|
||||
// {
|
||||
// throw new ValidationException("Messages 中 Content 和 Contents 字段不能同时有值");
|
||||
// }
|
||||
|
||||
if (Content is not null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user