Move embedded prompts to PromptKit definitions
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"sort"
|
||||
"strings"
|
||||
)
|
||||
@@ -16,6 +17,7 @@ type Key string
|
||||
const (
|
||||
CorrectionSetKey Key = "correction_set"
|
||||
ValidatorDecisionSetKey Key = "validator_decision_set"
|
||||
AssetRoot = "assets"
|
||||
correctionSetSchemaID = "audita.correction_set"
|
||||
validatorDecisionSchemaID = "audita.validator_decision_set"
|
||||
schemaVersionV1 = "v1"
|
||||
@@ -24,6 +26,20 @@ const (
|
||||
//go:embed assets/*.json
|
||||
var schemaAssets embed.FS
|
||||
|
||||
// Filesystem exposes the canonical embedded schemas to PromptKit.
|
||||
func Filesystem() fs.FS { return schemaAssets }
|
||||
|
||||
func AssetPath(key Key) (string, bool) {
|
||||
switch key {
|
||||
case CorrectionSetKey:
|
||||
return "correction_set.v1.json", true
|
||||
case ValidatorDecisionSetKey:
|
||||
return "validator_decision_set.v1.json", true
|
||||
default:
|
||||
return "", false
|
||||
}
|
||||
}
|
||||
|
||||
// Schema describes one registered structured response schema.
|
||||
type Schema struct {
|
||||
ID string `json:"id"`
|
||||
|
||||
Reference in New Issue
Block a user