Jay.Semantic 1.0.1

dotnet add package Jay.Semantic --version 1.0.1
                    
NuGet\Install-Package Jay.Semantic -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Jay.Semantic" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jay.Semantic" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Jay.Semantic" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Jay.Semantic --version 1.0.1
                    
#r "nuget: Jay.Semantic, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Jay.Semantic@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Jay.Semantic&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Jay.Semantic&version=1.0.1
                    
Install as a Cake Tool

Jay.Semantic

A lightweight semantic function router for LLMs in .NET
Register your C# methods, generate a function catalog, and invoke them automatically via OpenAI or any LLM provider.

✨ Features

  • 🔍 Auto-discovers methods with metadata
  • 🧠 Generates tool/function catalog for LLMs
  • 📤 Invokes mapped methods based on LLM output
  • 🔗 Supports OpenAI,
  • 📦 Plug-and-play NuGet package

🚀 Getting Started

dotnet add package Jay.Semantic

var s = new Semantic();
var testclass = new TestClass();
var weather = await s.RegisterSkillAndInvoke(testclass, "What is the current weather?");

//Your custom class
public class TestClass {
    [FunctionDescription("This method will return the current weather in sydney")]
    public  async Task<string> GetCurrentWeatherInSydneyAsync()
    {
        using var httpClient = new HttpClient();

        // Sydney coordinates: Latitude -33.87, Longitude 151.21
        var url = "https://api.open-meteo.com/v1/forecast?latitude=-33.87&longitude=151.21&current_weather=true";

        try
        {
            var response = await httpClient.GetStringAsync(url);

            using var weatherData = JsonDocument.Parse(response);
            var current = weatherData.RootElement.GetProperty("current_weather");

            var temp = current.GetProperty("temperature").GetDouble();
            var wind = current.GetProperty("windspeed").GetDouble();
            var time = current.GetProperty("time").GetString();

            return $"🌤️ As of {time}, the temperature in Sydney is {temp}°C with wind speed {wind} km/h.";
        }
        catch (Exception ex)
        {
            return $"❌ Error retrieving weather: {ex.Message}";
        }
    }

    

}



Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 492 7/24/2025
1.0.0 482 7/24/2025