SemanticRouter.Core
0.6.1
dotnet add package SemanticRouter.Core --version 0.6.1
NuGet\Install-Package SemanticRouter.Core -Version 0.6.1
<PackageReference Include="SemanticRouter.Core" Version="0.6.1" />
<PackageVersion Include="SemanticRouter.Core" Version="0.6.1" />
<PackageReference Include="SemanticRouter.Core" />
paket add SemanticRouter.Core --version 0.6.1
#r "nuget: SemanticRouter.Core, 0.6.1"
#:package SemanticRouter.Core@0.6.1
#addin nuget:?package=SemanticRouter.Core&version=0.6.1
#tool nuget:?package=SemanticRouter.Core&version=0.6.1
SemanticRouter.Core
The routing primitives of SemanticRouter.NET, with no dependencies: SIMD cosine similarity, a tokenizer-free token estimator, complexity heuristics, the semantic route index and the route and model selectors. It references no NuGet packages and is AOT-compatible.
Most applications want SemanticRouter.AspNetCore instead, which builds a router from configuration on top of this package. To route your own tools' prompts without writing code, install the semantic-router tool.
dotnet add package SemanticRouter.Core
using SemanticRouter;
ComplexityAnalysis analysis = new HeuristicComplexityAnalyzer().Analyze("Refactor this class and explain the trade-offs.");
Console.WriteLine($"{analysis.EstimatedTokens} tokens, complexity {analysis.Score:F2}");
float similarity = VectorMath.CosineSimilarity([0.1f, 0.7f, 0.2f], [0.2f, 0.6f, 0.1f]);
MIT licence. The packages are versioned together and depend on each other exactly: update all the SemanticRouter packages an application uses at once.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SemanticRouter.Core:
| Package | Downloads |
|---|---|
|
SemanticRouter.AspNetCore
ASP.NET Core integration for SemanticRouter: DI registration, prompt routing middleware and HTTP dispatch to local or cloud LLM endpoints. |
GitHub repositories
This package is not used by any popular GitHub repositories.