Constructor RagEngine
RagEngine(LM)
Initializes a new instance of the RagEngine class using a specified model for embedding generation.
public RagEngine(LM embeddingModel)
Parameters
Examples
using LMKit.Model;
using LMKit.Retrieval;
using System;
class Example
{
static void Main()
{
// Create an embedding model from a URI
LM embeddingModel = new LM(new Uri("https://huggingface.co/lm-kit/bge-m3-gguf/resolve/main/bge-m3-Q4_K_M.gguf"));
RagEngine ragEngine = new RagEngine(embeddingModel);
Console.WriteLine("RagEngine created successfully.");
}
}
Exceptions
- ArgumentNullException
Thrown if
embeddingModel
is null.