Capture prompt schema selections and source references
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"strings"
|
||||
"testing"
|
||||
"testing/fstest"
|
||||
|
||||
"go.maximumdirect.net/configkit"
|
||||
)
|
||||
@@ -64,7 +65,10 @@ func TestPromptResolutionNormalizesOutputAndRejectsDuplicateNames(t *testing.T)
|
||||
"messages": []any{map[string]any{"role": "user", "content": "hello"}},
|
||||
"output": map[string]any{"format": "json", "validation_mode": "json_schema", "schema_path": " schema.json "},
|
||||
}
|
||||
state, err := load(mapping("prompt metadata", map[string]any{"prompts": []any{definition}}), nil)
|
||||
filesystem := configkit.NewFilesystem("schemas", fstest.MapFS{})
|
||||
input := mapping("prompt metadata", map[string]any{"schema_root": ".", "prompts": []any{definition}})
|
||||
input.Filesystem = &configkit.FilesystemContext{FS: &filesystem, Root: ".", BaseDir: "."}
|
||||
state, err := load(input, nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user