Document prompt-owned schemas and finalize migration
This commit is contained in:
@@ -37,7 +37,9 @@ type PromptMessageConfig struct {
|
||||
// PromptCacheControlConfig supplies optional cache-control source fields.
|
||||
type PromptCacheControlConfig struct{ Type, TTL *string }
|
||||
|
||||
// PromptOutputConfig supplies optional output contract source fields.
|
||||
// PromptOutputConfig supplies optional output contract source fields. Schema
|
||||
// supplies a nonnull inline value, and SchemaFile and SchemaPath are reference
|
||||
// selections. Raw ConfigKit mappings can express explicit null to clear one.
|
||||
type PromptOutputConfig struct {
|
||||
Format, ValidationMode, SchemaPath, SchemaFile *string
|
||||
Schema any
|
||||
@@ -45,6 +47,8 @@ type PromptOutputConfig struct {
|
||||
}
|
||||
|
||||
// SchemaRootSource supplies a schema root as a native configuration mapping.
|
||||
// The caller chooses the input layer and supplies its filesystem context. The
|
||||
// helper neither validates the value nor opens resources.
|
||||
func SchemaRootSource(label, root string) configkit.Source {
|
||||
return configkit.Mapping(label, map[string]any{"schema_root": root})
|
||||
}
|
||||
@@ -54,7 +58,7 @@ func SchemaRootSource(label, root string) configkit.Source {
|
||||
// sibling inheritance and layered sources can complete them before NewEngine
|
||||
// validates the final configuration. Mapping snapshots supported values when
|
||||
// constructed; the helper neither resolves inheritance nor reads files.
|
||||
// Relative content files use the ConfigKit Input filesystem context of the
|
||||
// Relative content and schema files use the ConfigKit Input filesystem context of the
|
||||
// contributing field. Raw mappings remain available for explicit null and
|
||||
// generic ConfigKit operations.
|
||||
func PromptSource(label string, prompts []PromptConfig) configkit.Source {
|
||||
|
||||
Reference in New Issue
Block a user