Migrate native PromptKit test fixtures
This commit is contained in:
@@ -8,11 +8,11 @@ import (
|
||||
"testing"
|
||||
"testing/fstest"
|
||||
|
||||
configkit "go.maximumdirect.net/configkit"
|
||||
promptkit "go.maximumdirect.net/promptkit"
|
||||
"go.maximumdirect.net/ckconfig"
|
||||
"go.maximumdirect.net/ckprompt"
|
||||
commandkit "go.maximumdirect.net/commandkit"
|
||||
configkit "go.maximumdirect.net/configkit"
|
||||
promptkit "go.maximumdirect.net/promptkit"
|
||||
)
|
||||
|
||||
type compositionInput struct{ Campaign commandkit.Supplied[string] }
|
||||
@@ -144,8 +144,7 @@ func TestPromptKitAliasesComposeWithInstalledOperations(t *testing.T) {
|
||||
func TestPublicConfigurationAndDefinitionFamiliesRemainIndependent(t *testing.T) {
|
||||
inputs, err := promptkit.FilesystemInputs("composition fixture", fstest.MapFS{
|
||||
"config/prompts.yml": &fstest.MapFile{Data: []byte(`prompts:
|
||||
briefing:
|
||||
version: "1"
|
||||
- id: briefing
|
||||
default_profile: default
|
||||
messages:
|
||||
- role: user
|
||||
@@ -154,17 +153,17 @@ func TestPublicConfigurationAndDefinitionFamiliesRemainIndependent(t *testing.T)
|
||||
format: text
|
||||
validation_mode: none
|
||||
backends:
|
||||
local:
|
||||
- id: local
|
||||
endpoint: "https://example.invalid/v1"
|
||||
profiles:
|
||||
default:
|
||||
- id: default
|
||||
backend: local
|
||||
model: example
|
||||
`)}}, "config")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
engine, err := promptkit.NewEngine(promptkit.Config{Sources: promptkit.ConfigurationSources{Underlays: []configkit.Underlay{{Inputs: inputs}}}})
|
||||
engine, err := promptkit.NewEngine(promptkit.Config{Sources: promptkit.ConfigurationSources{Underlays: []configkit.Underlay{{Inputs: inputs}}}}, promptkit.WithBundledOpenRouter(false))
|
||||
if err != nil {
|
||||
t.Fatalf("construct engine: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user