Bind schema selections throughout execution
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
"testing"
|
||||
"testing/fstest"
|
||||
"time"
|
||||
|
||||
"go.maximumdirect.net/configkit"
|
||||
@@ -308,7 +309,10 @@ type failingSchemaFS struct {
|
||||
calls int
|
||||
}
|
||||
|
||||
func (source *failingSchemaFS) Open(string) (fs.File, error) {
|
||||
func (source *failingSchemaFS) Open(name string) (fs.File, error) {
|
||||
if name == "." {
|
||||
return (fstest.MapFS{}).Open(name)
|
||||
}
|
||||
source.mu.Lock()
|
||||
source.calls++
|
||||
source.mu.Unlock()
|
||||
@@ -346,8 +350,8 @@ func TestSmokeTestUsesPrivateInferenceWithoutApplicationResourcesOrListingChange
|
||||
},
|
||||
}},
|
||||
})}
|
||||
engine, err := promptkit.NewEngine(promptkit.Config{Sources: promptkit.ConfigurationSources{Main: &input}},
|
||||
promptkit.WithLLMClient(client), promptkit.WithArtifactReader(reader), promptkit.WithSchemaFS(schemaSource, "schemas"))
|
||||
engine, err := promptkit.NewEngine(promptkit.Config{Sources: promptkit.ConfigurationSources{Main: &input, Underlays: []configkit.Underlay{{Inputs: []configkit.Input{schemaRootInput(schemaSource, "schemas")}}}}},
|
||||
promptkit.WithLLMClient(client), promptkit.WithArtifactReader(reader))
|
||||
if err != nil {
|
||||
t.Fatalf("construct engine: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user