Capture keyed prompts and source-backed content at load time
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"crypto/sha256"
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"hash"
|
||||
@@ -809,10 +808,5 @@ func buildOutputArtifact(content string, format domain.OutputFormat) domain.Arti
|
||||
}
|
||||
|
||||
func hashPromptDefinition(def *domain.PromptDefinition) (string, error) {
|
||||
b, err := json.Marshal(def)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
sum := sha256.Sum256(b)
|
||||
return hex.EncodeToString(sum[:]), nil
|
||||
return promptdef.HashDefinition(def)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user