VOOZH about

URL: https://www.nuget.org/packages/Smith/

⇱ NuGet Gallery | Smith 0.2.5


ο»Ώ

πŸ‘ Image
Smith 0.2.5

dotnet add package Smith --version 0.2.5
 
 
NuGet\Install-Package Smith -Version 0.2.5
 
 
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="Smith" Version="0.2.5" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Smith" Version="0.2.5" />
 
Directory.Packages.props
<PackageReference Include="Smith" />
 
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 Smith --version 0.2.5
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Smith, 0.2.5"
 
 
#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 Smith@0.2.5
 
 
#: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=Smith&version=0.2.5
 
Install as a Cake Addin
#tool nuget:?package=Smith&version=0.2.5
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Run AI-powered C# files using Microsoft.Extensions.AI and Devlooped.Extensions.AI

Example leveraging Grok:

#:package Smith@0.*

// Sample X.AI client usage with .NET
var messages = new Chat()
{
 { "system", "You are a highly intelligent AI assistant." },
 { "user", "What is 101*3?" },
};

IChatClient grok = new GrokClient(Throw.IfNullOrEmpty(Env.Get("XAI_API_KEY")))
 .GetChatClient("grok-3-mini")
 .AsIChatClient();

var options = new GrokChatOptions
{
 ReasoningEffort = ReasoningEffort.High, // or ReasoningEffort.Low
 Search = GrokSearch.Auto, // or GrokSearch.On/GrokSearch.Off
};

var response = await grok.GetResponseAsync(messages, options);

AnsiConsole.MarkupLine($":robot: {response.Text}");

The most useful namespaces and dependencies for developing Microsoft.Extensions.AI-powered applications are automatically referenced and imported when using this package.

Example using Claude:

πŸ‘ alternate text is missing from this package README image

#:package Smith@0.*

var client = new Anthropic.AnthropicClient(Throw.
 Env.Get("Claude:Key") ?? throw new InvalidOperationException("Missing Claude:Key configuration."),
 services.GetRequiredService<IHttpClientFactory>().CreateClient("ai")))
 .UseLogging()
 .UseFunctionInvocation();

var builder = App.CreateBuilder(args);
builder.Services.AddChatClient(new );

var app = builder.Build();

var history = new List<ChatMessage> { new ChatMessage(ChatRole.System, Prompts.System) };
var chat = app.Services.GetRequiredService<IChatClient>();

var options = new ChatOptions
{
 ModelId = "claude-sonnet-4-20250514",
 MaxOutputTokens = 1000,
 Temperature = 0.7f,
 Tools = [AIFunctionFactory.Create(() => DateTime.Now, "get_datetime", "Gets the current date and time on the user's local machine.")]
};

AnsiConsole.MarkupLine($":robot: Ready v{ThisAssembly.Info.Version}");
AnsiConsole.Markup($":person_beard: ");
while (true)
{
 var input = Console.ReadLine()?.Trim();
 if (string.IsNullOrEmpty(input))
 continue;

 history.Add(new ChatMessage(ChatRole.User, input));

 try
 {
 var response = await AnsiConsole.Status().StartAsync(":robot: Thinking...",
 ctx => chat.GetResponseAsync(input, options));

 history.AddRange(response.Messages);
 // Try rendering as formatted markup
 try
 {
 if (response.Text is { Length: > 0 })
 AnsiConsole.MarkupLine($":robot: {response.Text}");
 }
 catch (Exception)
 {
 // Fallback to escaped markup text if rendering fails
 AnsiConsole.MarkupInterpolated($":robot: {response.Text}");
 }

 AnsiConsole.WriteLine();
 AnsiConsole.Markup($":person_beard: ");
 }
 catch (Exception e)
 {
 AnsiConsole.WriteException(e);
 }
}

static class Prompts
{
 public const string System =
 """
 Your responses will be rendered using Spectre.Console.AnsiConsole.Write(new Markup(string text))). 
 This means that you can use rich text formatting, colors, and styles in your responses, but you must 
 ensure that the text is valid markup syntax. 
 """;
}

Configuration / Environment Variables

The Env class provides access to the following variables/configuration automatically:

  • .env files: in local and parent directories
  • ~/.env file: in the user's home directory (%userprofile%\.env on Windows)
  • All default configuration sources from App Builder:
    • Environment variables prefixed with DOTNET_.
    • Command-line arguments.
    • appsettings.json.
    • appsettings.{Environment}.json.
    • Secret Manager when the app runs in the Development environment.
    • Environment variables.
    • Command-line arguments.

Sponsors

πŸ‘ Clarius Org
πŸ‘ MFB Technologies, Inc.
πŸ‘ Torutek
πŸ‘ DRIVE.NET, Inc.
πŸ‘ Keith Pickford
πŸ‘ Thomas Bolon
πŸ‘ Kori Francis
πŸ‘ Toni Wenzel
πŸ‘ Uno Platform
πŸ‘ Reuben Swartz
πŸ‘ Jacob Foshee
πŸ‘ alternate text is missing from this package README image
πŸ‘ Eric Johnson
πŸ‘ David JENNI
πŸ‘ Jonathan
πŸ‘ Charley Wu
πŸ‘ Ken Bonny
πŸ‘ Simon Cropp
πŸ‘ agileworks-eu
πŸ‘ Zheyu Shen
πŸ‘ Vezel
πŸ‘ ChilliCream
πŸ‘ 4OTC
πŸ‘ Vincent Limo
πŸ‘ Jordan S. Jones
πŸ‘ domischell
πŸ‘ Justin Wendlandt
πŸ‘ Adrian Alonso
πŸ‘ Michael Hagedorn
πŸ‘ Alex RΓΈnne Petersen

πŸ‘ Sponsor this project
 

Learn more about GitHub Sponsors

Product Versions Compatible and additional computed target framework versions.
.NET net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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.2.5 861 7/16/2025
0.2.4 174 7/15/2025
0.2.3 211 7/14/2025
0.2.2 420 7/13/2025
0.2.1 219 7/2/2025
0.2.0 221 7/2/2025
0.1.2 466 6/2/2025
0.1.1 436 6/2/2025
0.1.0 432 6/2/2025