NovelAIClient 1.0.3

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package NovelAIClient --version 1.0.3
NuGet\Install-Package NovelAIClient -Version 1.0.3
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="NovelAIClient" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NovelAIClient --version 1.0.3
#r "nuget: NovelAIClient, 1.0.3"
#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.
// Install NovelAIClient as a Cake Addin
#addin nuget:?package=NovelAIClient&version=1.0.3

// Install NovelAIClient as a Cake Tool
#tool nuget:?package=NovelAIClient&version=1.0.3

NovelAIClient

这是一个帮助.Net用户调用私服NovelAI的库,支持WebUI和Naifu前端

先决条件:您需要有一个可用的私服NovelAI实例(WebUI或Naifu前端至少一个能打开,并能成功在浏览器生成图片)

如何使用

对于初版WebUI
            int fn_index = 13;
            WebUIClient webUIClient = new WebUIClient(fn_index, "http://127.0.0.1:7860/");  //WebUI服务地址
            byte[]? imageBytes = await webUIClient.PostAsync("生成提示词");  //还有含屏蔽词和图片尺寸以及所有参数实体的重载
            if (imageBytes is not null)
                Image bmp = new Bitmap(new MemoryStream(imageBytes));
对于后续任意魔改版WebUI
            int fn_index = 104;
            CustomWebUIClient webUIClient = new CustomWebUIClient(fn_index, "http://127.0.0.1:7860/");  //WebUI服务地址
            byte[]? imageBytes = await webUIClient.PostAsync("自定义参数字符串","生成提示词","屏蔽词");
            if (imageBytes is not null)
                Image bmp = new Bitmap(new MemoryStream(imageBytes));
对于Naifu
            NaifuClient naifuClient = new NaifuClient("http://127.0.0.1:6969/", true);  //Naifu服务地址和是否填充Naifu网页默认参数
            byte[]? imageBytes = await naifuClient.PostAsync("生成提示词");  //还有含屏蔽词和图片尺寸以及所有参数实体的重载
            if (imageBytes is not null)
                Image bmp = Image.FromStream(new MemoryStream(imageBytes));
关于 WebUI 的 fn_index 和自定义参数获取办法

打开浏览器开发者工具并发起一个请求,随后在(Edge:网络-负载)/(Chrome:网络-请求)中复制 fn_indexAndData

如何安装

使用NuGet包安装

  Install-Package NovelAIClient

暂时只有接入了根据关键词生成图片的API,如果有其他人用这个的话会考虑加上接入以图片生成图片和根据图片反推标签的API

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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