You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

sharpchat

Package Overview
Dependencies
Maintainers
0
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

sharpchat

1.0.0
unpublished
nugetNuGet
Maintainers
0
Source

SharpChat

.NET Build

SharpChat is a C# library that tries to offer functionality similar to TypeChat, making it seamless to construct natural language interfaces using types. Schema enginerring is the new prompt engineering!

Installation

WIP

Get Started

SharpChat is setup during initialization of your services. Simply call AddSharpChat to register the functions you want the chatbot to use.


var services = new ServiceCollection()
    .AddSharpChat((f, _) => f
        .RegisterFunction(myFunc1)
        .RegisterFunction(myFunc2)
        ...
    .BuildServiceProvider();

Start a conversation, passing an OpenAI API client initialized with your API key.

var factory = services.GetRequiredService<IConversationFactory>();
var client = new OpenAIClient(apikey);
var conversation = factory.StartConversation(client, model);

SharpChat automatically exposes your registerd functions to the conversation, allowing the chatbot to call them! Now you can start chatting!

var output = await conversation.Prompt("...");

Take a look at SharpChat.Examples.Shopping and SharpChat.Examples.Math for inspiration on how to use SharpChat.

Keywords

OpenAI

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts