using AIStudio.Settings; namespace AIStudio.Tools.ToolCallingSystem.ToolCallingImplementations.SemanticSearch; /// /// The data sources Semantic Search offers the model in a request. /// /// The data sources the model may search, in the order they are offered. /// The ERI data sources of the chat whose server could not be reached or signed in to. The model learns their names, but can never search them. internal readonly record struct OfferedDataSources(IReadOnlyList Searchable, IReadOnlyList Unreachable) { public static readonly OfferedDataSources NONE = new([], []); /// /// Whether there is nothing at all to tell the model about. /// public bool IsEmpty => this.Searchable.Count == 0 && this.Unreachable.Count == 0; /// /// Whether the model may search at least one data source, which the tool needs to be offered at all. /// public bool IsSearchable => this.Searchable.Count > 0; }