Bind schema selections throughout execution
This commit is contained in:
@@ -3,7 +3,6 @@ package promptkit_test
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"testing/fstest"
|
||||
|
||||
"go.maximumdirect.net/configkit"
|
||||
"go.maximumdirect.net/promptkit"
|
||||
@@ -52,8 +51,7 @@ func TestMessageContentHashIgnoresPreparationMetadata(t *testing.T) {
|
||||
session := prepareContentHash(t, baseEngine, promptkit.RunRequest{PromptID: "first", SessionID: "other-session"})
|
||||
cacheEngine := contentHashEngine(t, "first", "alpha", "one", "same", textOutput, true)
|
||||
cached := prepareContentHash(t, cacheEngine, promptkit.RunRequest{PromptID: "first"})
|
||||
schemas := fstest.MapFS{"schema.json": &fstest.MapFile{Data: []byte(`{"type":"object"}`)}}
|
||||
schemaEngine := contentHashEngine(t, "first", "alpha", "one", "same", map[string]any{"format": "json", "validation_mode": "json_schema", "schema_path": "schema.json"}, false, promptkit.WithSchemaFS(schemas, "."))
|
||||
schemaEngine := contentHashEngine(t, "first", "alpha", "one", "same", map[string]any{"format": "json", "validation_mode": "json_schema", "schema": map[string]any{"type": "object"}}, false)
|
||||
schema := prepareContentHash(t, schemaEngine, promptkit.RunRequest{PromptID: "first"})
|
||||
for name, prepared := range map[string]*promptkit.PreparedRun{
|
||||
"repeat": repeated, "prompt": prepareContentHash(t, otherPrompt, promptkit.RunRequest{PromptID: "second"}),
|
||||
|
||||
Reference in New Issue
Block a user