LMStudio 1.2.0
dotnet add package LMStudio --version 1.2.0
NuGet\Install-Package LMStudio -Version 1.2.0
<PackageReference Include="LMStudio" Version="1.2.0" />
<PackageVersion Include="LMStudio" Version="1.2.0" />
<PackageReference Include="LMStudio" />
paket add LMStudio --version 1.2.0
#r "nuget: LMStudio, 1.2.0"
#:package LMStudio@1.2.0
#addin nuget:?package=LMStudio&version=1.2.0
#tool nuget:?package=LMStudio&version=1.2.0
LMStudio
LMStudio is a C# project that provides an interface to interact with the LMStudio integrated server. It is designed to manage chat history and send requests to an AI model server to generate responses based on the chat history.
Getting Started
To get started with LMStudio, you need to initialize a ModelConnection with the base URL of your AI model server and the model name. Optionally, you can also provide an API key.
var baseUrl = "http://your-model-server.com/v1/";
var model = "your-model-name";
var lmStudio = new ModelConnection(baseUrl, model);
Chatting with the AI
To chat with the AI, you need to create an instance of the Chat class, passing in your ModelConnection and an optional initial message.
var customInitMessage = "You are an AI assistant. You are designed to help users with their questions, always give a correct answer, and be polite.";
var chat = new Chat(lmStudio, customInitMessage);
You can then send user messages to the AI model server and receive responses using the CreateChatCompletion method.
var userInput = "Hello, AI!";
var response = chat.CreateChatCompletion(userInput);
Console.WriteLine(response);
Project Configuration
The project is configured to target .NET 8.0 and has enabled implicit usings and nullable reference types. The license for the project is MIT.
| Product | Versions 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. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.