BotSharp/src/Infrastructure/BotSharp.Abstraction/VectorStorage/Models/VectorSearchOptions.cs

25 lines
753 B
C#
Raw Normal View History

using BotSharp.Abstraction.Knowledges.Enums;
2024-08-15 23:19:10 +00:00
namespace BotSharp.Abstraction.VectorStorage.Models;
2023-06-18 18:15:00 +00:00
2024-08-15 23:19:10 +00:00
public class VectorSearchOptions
2023-06-18 18:15:00 +00:00
{
2025-08-05 20:46:07 +00:00
public IEnumerable<string>? Fields { get; set; } = [KnowledgePayloadName.Text, KnowledgePayloadName.Answer];
2025-08-08 20:27:38 +00:00
public IEnumerable<VectorFilterGroup>? FilterGroups { get; set; }
public int? Limit { get; set; } = 5;
public float? Confidence { get; set; } = 0.5f;
public bool WithVector { get; set; }
2025-08-05 20:46:07 +00:00
public static VectorSearchOptions Default()
{
return new()
{
Fields = [KnowledgePayloadName.Text, KnowledgePayloadName.Answer],
2025-08-08 20:27:38 +00:00
FilterGroups = null,
2025-08-05 20:46:07 +00:00
Limit = 5,
Confidence = 0.5f,
WithVector = false
};
}
2023-06-18 18:15:00 +00:00
}