JevDotNet 0.9.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package JevDotNet --version 0.9.2
                    
NuGet\Install-Package JevDotNet -Version 0.9.2
                    
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="JevDotNet" Version="0.9.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JevDotNet" Version="0.9.2" />
                    
Directory.Packages.props
<PackageReference Include="JevDotNet" />
                    
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 JevDotNet --version 0.9.2
                    
#r "nuget: JevDotNet, 0.9.2"
                    
#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 JevDotNet@0.9.2
                    
#: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=JevDotNet&version=0.9.2
                    
Install as a Cake Addin
#tool nuget:?package=JevDotNet&version=0.9.2
                    
Install as a Cake Tool

Build and Test Coverage Status Bugs NuGet version

JevDotNet

NuGet Wiki Changelog YouTube API Reference

JevDotNet is an opinionated, convention-based .NET client for the TypeSafe AI Jev API. It turns Jev Choice, Score, and Noul answers into a strongly typed result object.

Start with the wiki's implementation walkthrough, then use its guides to build your return object and work with each Jev type.

YouTube video how to use

https://youtu.be/T6jRVRXtRd8

Installation

JevDotNet is available on NuGet.

dotnet add package JevDotNet

JevDotNet targets .NET 8 or higher.

Quick start

Step 1: Define your return object and decorate its properties with the Jev attributes (Choice, Score, or Noul). The property types can be either simple or detailed types (see below):

using System.ComponentModel;
using JevDotNet;
using JevDotNet.Models;

public sealed class MyJevReturnObject
{
    [JevChoiceQuestion<Category>("What is the primary category?")]
    public Category? Category { get; set; }

    [JevScoreQuestion<Severity>("How severe is the reported impact?")]
    public double? Severity { get; set; }

    [JevNoulQuestion("Is the product broken?", threshold: 0.7)]
    public bool? IsBroken { get; set; }
}

public enum Category
{
    [Description("Questions about using or troubleshooting the product")]
    Technical,

    [Description("Questions about invoices, payments, or subscriptions")]
    Billing,

    Other
}

public enum Severity
{
    Cosmetic,
    Degraded,
    Blocking
}

Step 2: Create a client and evaluate some text:

JevClient client = new JevClient(Environment.GetEnvironmentVariable("JEV_API_KEY")!);

string input = "The customer cannot sign in after resetting their password.";
JevResponse<MyJevReturnObject> response = await client.EvaluateAsync<MyJevReturnObject>(input);

MyJevReturnObject myReturnObject = response.Result;

Category? category = myReturnObject.Category;
double? severity = myReturnObject.Severity;
bool? isBroken = myReturnObject.IsBroken;

Each attributed property defines one question.

Dependency injection

In an ASP.NET Core application, register JevClient as a singleton:

using JevDotNet;
using Microsoft.AspNetCore.Builder;

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
string apiKey = Environment.GetEnvironmentVariable("JEV_API_KEY")
    ?? throw new InvalidOperationException("Set JEV_API_KEY.");

builder.Services.AddJevClient(apiKey);

You can also pass a JevClientOptions instance to AddJevClient to configure the model, endpoint, or HTTP client. Resolve JevClient from dependency injection wherever it is needed.

Question types

Choice

[JevChoiceQuestion<TEnum>] returns one enum member:

[JevChoiceQuestion<Category>("What is the primary category?")]
public Category? Category { get; set; }

or

[JevChoiceQuestion<Category>("What is the primary category?")]
public JevChoice<Category>? Category { get; set; }

Score

[JevScoreQuestion<TEnum>] uses an enum with 2–10 members as an ordered scale. The members are ordered by their underlying numeric values and mapped to levels 0, 1, 2, and so on. Use double, decimal, or their nullable forms for only the score:

[JevScoreQuestion<Severity>("How severe is this?")]
public double? Severity { get; set; }

or

[JevScoreQuestion<Severity>("How severe is this?")]
public JevScore<Severity>? Severity { get; set; }

Noul

[JevNoulQuestion] returns a probability from 0 to 1. Use double, decimal or JevNoul to receive the probability.

Boolean properties default to true at 0.5 or above. Configure the inclusive threshold on the question itself:

[JevNoulQuestion("Is the product broken?", threshold: 0.7)]
public bool? IsBroken { get; set; }

Custom client configuration

For custom configuration, construct the client with JevClientOptions:

HttpClient httpClient = new HttpClient();

var client = new JevClient(new JevClientOptions
{
    ApiKey = apiKey,
    Model = "jev-latest",
    Endpoint = new Uri("https://api.typesafe.ai/v1/systemone"),
    HttpClientFactory = () => httpClient
});

The returned JevResponse<T> contains the converted Result together with the InputTokenCount and OutputTokenCount reported by the API.

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
0.9.3 107 9/23/2026
0.9.2 91 9/22/2026
0.9.1 96 9/22/2026
0.9.0 89 9/22/2026