Install and configure SmartRAG in your .NET application in just a few minutes
Installation
SmartRAG is available as a NuGet package and supports .NET Standard 2.0/2.1, making it compatible with .NET Framework 4.6.1+, .NET Core 2.0+, and .NET 5+ applications. Choose your preferred installation method:
Configure SmartRAG in your Program.cs or Startup.cs:
// Program.cs
using SmartRAG;
var builder = WebApplication.CreateBuilder(args);
// Add SmartRAG services
builder.Services.AddSmartRAG(options =>
{
options.AIProvider = AIProvider.Anthropic;
options.StorageProvider = StorageProvider.Qdrant;
options.ApiKey = "your-api-key";
});
var app = builder.Build();
Quick Example
Here's a simple example using the actual SmartRAG implementation with conversation history:
// Inject the document search service
public class SearchController : ControllerBase
{
private readonly IDocumentSearchService _documentSearchService;
public SearchController(IDocumentSearchService documentSearchService)
{
_documentSearchService = documentSearchService;
}
[HttpPost("search")]
public async Task<ActionResult