PromptQueries 1.0.0
dotnet add package PromptQueries --version 1.0.0
NuGet\Install-Package PromptQueries -Version 1.0.0
<PackageReference Include="PromptQueries" Version="1.0.0" />
paket add PromptQueries --version 1.0.0
#r "nuget: PromptQueries, 1.0.0"
// Install PromptQueries as a Cake Addin #addin nuget:?package=PromptQueries&version=1.0.0 // Install PromptQueries as a Cake Tool #tool nuget:?package=PromptQueries&version=1.0.0
PromptQueries
PromptQueries is a C# library that provides an easy way to execute complex queries on collections of objects using OpenAI's GPT-3 language model. With this library, you can query your collections using natural language queries and get accurate and relevant results.
Installation
To use PromptQueries in your .NET project, you can install it from NuGet. Just run the following command in your NuGet package manager console:
mathematicaCopy code
Install-Package PromptQueries
Usage
Authenticating your OpenAI API key
Before you can use PromptQueries to execute queries, you need to authenticate your OpenAI API key. You can do this by calling the AddOpenAiAuth
method when configuring your application's services:
csharpCopy code
using Queries.Ai;
using Microsoft.Extensions.DependencyInjection;
// ...
services.AddOpenAiAuth("<your OpenAI API key>");
Executing queries
To execute a query, you need to call the RunQuery
method of the IQueryPrompt
interface. Here's an example:
csharpCopy code
using Queries.Ai.Utils;
// ...
IQueryable<Person> people = // get your collection of people
var queryPrompt = new QueryPrompt("<your OpenAI API key>");
var result = await queryPrompt.RunQuery(people, "find all people named John");
// do something with the result
Examples
Here are some example queries you can execute using PromptQueries:
- Find all people named John
- Find all people older than 30
- Find all people whose name starts with "J" and are older than 25
Contributing
Contributions to PromptQueries are welcome! To contribute, just fork this repository, make your changes, and submit a pull request.
License
PromptQueries is licensed under the MIT License.
Support
If you find PromptQueries useful, consider supporting the project by making a donation via PayPal:
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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. |
-
net6.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- OpenAI.API (>= 1.0.0)
- System.Linq.Dynamic.Core (>= 1.3.2)
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 | 5/5/2023 |
1.0.0
Added support for querying entities based on natural language prompts.
Included API endpoint for making queries using HTTP GET requests.
Added support for dependency injection.
Included example projects for usage with and without dependency injection.
Added detailed documentation and a README file for easy project setup.