Property DataSources
DataSources
Gets a read-only collection of DataSource objects representing the imported content repositories.
public IReadOnlyList<DataSource> DataSources { get; }
Property Value
- IReadOnlyList<DataSource>
A read-only list of registered data sources used for retrieval operations.
Examples
using LMKit.Data;
using LMKit.Model;
using LMKit.Retrieval;
using System;
class Example
{
static void Main()
{
LM embeddingModel = LM.LoadFromModelID("embeddinggemma-300m");
RagEngine ragEngine = new RagEngine(embeddingModel);
// The data sources list is initially empty.
Console.WriteLine($"Initial DataSources count: {ragEngine.DataSources.Count}");
// Add a DataSource.
DataSource ds = new DataSource("myDataSource");
ragEngine.AddDataSource(ds);
// Now the DataSources property reflects the newly added item.
Console.WriteLine($"Updated DataSources count: {ragEngine.DataSources.Count}");
}
}