Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 687 Bytes

README.md

File metadata and controls

33 lines (22 loc) · 687 Bytes

KoboldSharp

A C# package for interfacing with koboldcpp's REST API

Installation

With .NET CLI

dotnet add package KoboldSharp

With Package Manager

NuGet\Install-Package KoboldSharp

Usage

using KoboldSharp;

// Replace 127.0.0.1 with the ip/hostname of the host running Koboldcpp
KoboldClient client = new KoboldClient("http://127.0.0.1:5001");

var parameters = new GenParams("Hello my name is ");

// multiple parameters can be adjusted, such as max length, temperature etc...
parameters.MaxLength = 10;

var result = await client.Generate(paramaters);

Console.WriteLine(result.Results[0].Text);