DotPrompt.Sql 0.1.2

dotnet add package DotPrompt.Sql --version 0.1.2                
NuGet\Install-Package DotPrompt.Sql -Version 0.1.2                
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="DotPrompt.Sql" Version="0.1.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotPrompt.Sql --version 0.1.2                
#r "nuget: DotPrompt.Sql, 0.1.2"                
#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 DotPrompt.Sql as a Cake Addin
#addin nuget:?package=DotPrompt.Sql&version=0.1.2

// Install DotPrompt.Sql as a Cake Tool
#tool nuget:?package=DotPrompt.Sql&version=0.1.2                

DotPrompt.Sql

This is a SQL store configured to be used with the the DotPrompt library. It currently has support for everything that you would find in DotPrompt prompt files bar a couple of things that are still in development. You can give it a prompt file and it will add the data from the prompt file to a set of related SQL tables.

In order to use this a CLI is provided which will allow you to add a prompt file to the database as long it adheres to the rules defined in DotPrompt.

You can use the CLI with the following syntax:

DotPrompt.Sql.Cli ./prompts/basic.prompt ./sample.yaml 

The YAML file should contain the connection details to SQL Server / Azure SQL DB or Microsoft Fabric SQL DB with the following format.

server: "myserver.database.windows.net"
database: "mydatabase"
tablename: "mytable"
username: "myuser"
password: "mypassword"
integrated_authentication: false
aad_authentication: true

DotPrompt.SQL currently supports the following features from a prompt file.

  • System prompt
  • User prompt
  • Model
  • Name
  • Temperature
  • MaxTokens
  • Parameters
  • Default

It doesn't currently support the Few Shot Prompt section but will shortly. It has been tested only for only username and password database access but will be tested with the others so whilst config is supported access may well break. Let me know if this is the case.

It will automatically create the tables with a unique constraint on PromptName which name which names that the names in the prompt files should be unique for now although I'll be looking at more composite uniqueness in the future with a category table and categoryid which will test for unique names within the category itself.

Open Source Diagrams.png

The above is right as per v0.1 and I'll update until I get to a stable build which covers all of the features from DotPrompt.

You can review DotPrompt here.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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
0.1.2 55 1/26/2025
0.1.1 57 1/26/2025