Document prompt-owned schemas and finalize migration
This commit is contained in:
@@ -91,9 +91,11 @@ func run() (summary, error) {
|
||||
return summary{}, err
|
||||
}
|
||||
backendID, proposalModel, assessmentModel := "offline-backend", "proposal-model", "assessment-model"
|
||||
filesystem := configkit.NewFilesystem("example schemas", assets)
|
||||
backend := promptkit.LocalBackend("https://example.invalid/v1", 1)
|
||||
backend.ID = backendID
|
||||
inputs = append(inputs,
|
||||
configkit.Input{Source: promptkit.SchemaRootSource("example schemas", "schemas"), Filesystem: &configkit.FilesystemContext{FS: &filesystem, Root: ".", BaseDir: "."}},
|
||||
configkit.Input{Source: promptkit.BackendSource("example backend", []promptkit.BackendConfig{
|
||||
backend,
|
||||
})},
|
||||
@@ -105,7 +107,7 @@ func run() (summary, error) {
|
||||
engine, err := promptkit.NewEngine(promptkit.Config{
|
||||
Sources: promptkit.ConfigurationSources{Underlays: []configkit.Underlay{{Inputs: inputs}}},
|
||||
HTTPClient: &http.Client{Transport: transport},
|
||||
}, promptkit.WithBundledOpenRouter(false), promptkit.WithSchemaFS(assets, "schemas")) // Keep the example's configuration self-contained.
|
||||
}, promptkit.WithBundledOpenRouter(false)) // Keep the example's configuration self-contained.
|
||||
if err != nil {
|
||||
return summary{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user