CyberQuery.Core.Completions
1.0.2-alpha
This is a prerelease version of CyberQuery.Core.Completions.
dotnet add package CyberQuery.Core.Completions --version 1.0.2-alpha
NuGet\Install-Package CyberQuery.Core.Completions -Version 1.0.2-alpha
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="CyberQuery.Core.Completions" Version="1.0.2-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CyberQuery.Core.Completions" Version="1.0.2-alpha" />
<PackageReference Include="CyberQuery.Core.Completions" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CyberQuery.Core.Completions --version 1.0.2-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CyberQuery.Core.Completions, 1.0.2-alpha"
#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.
#:package CyberQuery.Core.Completions@1.0.2-alpha
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CyberQuery.Core.Completions&version=1.0.2-alpha&prerelease
#tool nuget:?package=CyberQuery.Core.Completions&version=1.0.2-alpha&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CyberQuery
Add aritificial intelligence query ablities to you application in 3 easy steps.
1. ChatGPT API key.
Obtain a ChatGPT API key from there website.
Add the ChatGPT section to your appsettings.json
{
ChatGPT : {
Key : "enter_key_given_here"
}
}
Program.cs
using CyberQuery;
...
string apiKey = builder.Configuration.GetChatGPTApiKey();
builder.Services.AddQueryServices(apiKey);
...
Inject the service
.razor
razor using statement
@inject IQueryService QueryService
.razor.cs
file code behind or within the @code { }
section of a .razor
file.
[Inject]
private IQueryService QueryService { get; set; } = default!;
Note: Only use one method within a component.
Within another service
using CyberQuery;
internal class SomeService
{
public SomeService(IQueryService queryService)
{
....
}
}
Usage
string someQuery = "Explain the significance of the "Great Emu War" in Australia.";
QueryDetails queryDetails = await queryService.QueryAsync(someQuery);
QueryDetails.cs
public class QueryDetails
{
Guid Id { get; set; }
DateTimeOffset? QueryResponseTime { get; set; }
DateTimeOffset QueryTime { get; set; }
string Question { get; set; }
string? Response { get; set; }
TimeSpan? GetDuration();
double? GetDurationInSeconds();
}
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. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 7.0.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 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.2-alpha | 135 | 2/8/2023 |