change model
This commit is contained in:
parent
0c064cd8b4
commit
3455535dbd
|
|
@ -14,7 +14,7 @@ public class SearchVectorKnowledgeRequest
|
|||
public IEnumerable<KeyValue>? Filters { get; set; }
|
||||
|
||||
[JsonPropertyName("filter_operator")]
|
||||
public string FilterOperator { get; set; } = "and";
|
||||
public string FilterOperator { get; set; } = "or";
|
||||
|
||||
[JsonPropertyName("limit")]
|
||||
public int? Limit { get; set; } = 5;
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ public class VectorKnowledgeViewModel
|
|||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public double? Score { get; set; }
|
||||
|
||||
[JsonPropertyName("vector")]
|
||||
[JsonPropertyName("vector_dimension")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public float[]? Vector { get; set; }
|
||||
public int? VectorDimension { get; set; }
|
||||
|
||||
|
||||
public static VectorKnowledgeViewModel From(VectorSearchResult result)
|
||||
|
|
@ -27,7 +27,7 @@ public class VectorKnowledgeViewModel
|
|||
Id = result.Id,
|
||||
Data = result.Data,
|
||||
Score = result.Score,
|
||||
Vector = result.Vector
|
||||
VectorDimension = result.Vector?.Length
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ public class VectorKnowledgeViewModel
|
|||
{
|
||||
Id = data.Id,
|
||||
Data = data.Data,
|
||||
Vector = data.Vector
|
||||
VectorDimension = data.Vector?.Length
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue