I wanted to shortly share some information about a project i posted to GitHub recently.
LLMchain.net i a basic abstraction of some big LLM providers api’s in .NET, that you can use today to quickly get started working with these models in any .NET project.
But why?
A good question is why? does the world really need another AI library. The answer, probably not.
I created this library as part of some experiments i was doing (of which i might share some more later) and i notices i kept rewriting/copying the same stuff for every little test i did. To work around this is created the library you see now.
Gettings Started
Getting started with the library is pretty easy (i think), you can get it via this NuGet feed.
Below you can see a very crude chat implementation using the library.
var chatOrchestrator = new ChatOrchestrator();
chatOrchestrator.AddAIProvider(new OpenAIProvider("{OPENAI_KEY}"));
Conversation conv = new Conversation()
{
Agent = new Agent()
{
Model = "gpt-4o",
ModelProvider = "OpenAI",
Name = "JARVIS",
SystemPrompt = "You are JARVIS, Just A Rather Very Intelligent System"
}
};
conv.Agent.Initialize();
chatOrchestrator.ActiveConversation = conv;
while (true)
{
Console.Write("[Human]: ");
string input = Console.ReadLine();
var resp = await chatOrchestrator.SendChatMessageAsync(new Message(input));
Console.WriteLine($"[AI]:{resp.Content}");
}
If you want to have a look at some more samples have a look at the example code in the repo https://github.com/remcobrilstra/LLMChain.net/tree/main/src/Clients/LLMChain.Client.CLI
Usage
Feel free to use it as an educational tool or as inspiration for new usecases, i would definetly not say it is ‘production ready’ in its current state, so use with some caution.
It’s mostly a platform for me to do some quick experiments with, and learn more about how we can use LLM’s in different settings.
Suggestions?
As i stated above i created this mostly as a tool for myself, but i’d love to hear suggestions or improvements from people so let me know if have any.