Lensophy 1.0.0
Prefix Reserveddotnet add package Lensophy --version 1.0.0
NuGet\Install-Package Lensophy -Version 1.0.0
<PackageReference Include="Lensophy" Version="1.0.0" />
paket add Lensophy --version 1.0.0
#r "nuget: Lensophy, 1.0.0"
// Install Lensophy as a Cake Addin #addin nuget:?package=Lensophy&version=1.0.0 // Install Lensophy as a Cake Tool #tool nuget:?package=Lensophy&version=1.0.0
Introduction
This API provides developers with the ability to enhance their comment systems (such as forums, blogs, or websites) by analyzing, filtering, and encouraging good behavior through suggested responses that guide towards a friendly perspective rather than censoring it.
An OpenAI account is required to use it
Getting Started
Installing the package with the last version.
dotnet add package Lensophy --version 1.0.0
In your appSettings.json
, add the following configuration:
{
"OpenAiConfig": {
"Secret": "your OpenAi secret"
}
}
In Program.cs
, perform the following registration:
var builder = WebApplication.CreateBuilder(args);
...
//code hidden for brevity.
var secret = builder.Configuration.GetSection("openaiconfig:secret").Value;
builder.Services.AddLensophy(secret);
In the SampleController
(or where you need it), inject the dependency:
[ApiController]
[Route("[controller]")]
public class SampleController : ControllerBase
{
private readonly LensophyService _lensophyService;
public SampleController(LensophyService lensophyService) => _lensophyService = lensophyService;
}
Call the AnalyseAsync
routine at the desired place.
[HttpPost(Name = "Analyse")]
public async Task<ContentAnalysed> Analyse([FromBody]ContentAnalyse contentToAnalyse)
{
var contentAnalysed = await _lensophyService.AnalyseAsync(contentToAnalyse).ConfigureAwait(false);
return contentAnalysed;
}
Release notes
Every version governs a basic principle of change, although it may carry other minor improvements.
- Provides developers with the ability to enhance their comment systems (such as forums, blogs, or websites) by analyzing, filtering, and encouraging good behavior through suggested responses that guide towards a friendly perspective.
Examples
A suggestion for your message system.
Contributing & Feedback
If you encounter a bug or have a feature request, please use the Issue Tracker or the Project Board. The project is also open to contributions, so feel free to fork the project and open pull requests. Contributions are highly appreciated! Please make sure it is covered by unit or integrations tests.
About the project
Remind people that, even physically distant from the interlocutor, respect must be maintained. Check the Lensowiki if you wanna read more about it.
License
Copyright © Raphael Moreira | MIT
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- Microsoft.Extensions.Http (>= 7.0.0)
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 |
---|---|---|
1.0.0 | 178 | 10/13/2023 |
Provides a service for message analysis, returning a gentle suggestion if the content is offensive in any way.