Carry optional prompt labels through results
This commit is contained in:
21
types.go
21
types.go
@@ -159,8 +159,10 @@ type RunRequest struct {
|
||||
type PreparedRun struct {
|
||||
// PromptID is the selected prompt identifier.
|
||||
PromptID string `json:"prompt_id"`
|
||||
// PromptVersion is the selected definition's descriptive version label.
|
||||
PromptVersion string `json:"prompt_version,omitempty"`
|
||||
// PromptVersion is the selected definition's descriptive version label. Nil
|
||||
// means no label was declared; a non-nil empty string is explicit. JSON omits
|
||||
// nil and preserves a declared empty string.
|
||||
PromptVersion *string `json:"prompt_version,omitempty"`
|
||||
// PromptHash is an opaque equality value for the selected definition.
|
||||
PromptHash string `json:"prompt_hash,omitempty"`
|
||||
// SelectedProfileID is the explicit request profile or prompt default that
|
||||
@@ -217,8 +219,10 @@ type RunResult struct {
|
||||
Validation ValidationResult `json:"validation"`
|
||||
// PromptID is the selected prompt identifier.
|
||||
PromptID string `json:"prompt_id"`
|
||||
// PromptVersion is the selected definition's descriptive version label.
|
||||
PromptVersion string `json:"prompt_version,omitempty"`
|
||||
// PromptVersion is the selected definition's descriptive version label. Nil
|
||||
// means no label was declared; a non-nil empty string is explicit. JSON omits
|
||||
// nil and preserves a declared empty string.
|
||||
PromptVersion *string `json:"prompt_version,omitempty"`
|
||||
// PromptHash is the same opaque definition equality value exposed by
|
||||
// PreparedRun.
|
||||
PromptHash string `json:"prompt_hash,omitempty"`
|
||||
@@ -394,14 +398,17 @@ type PromptInputDefinition struct {
|
||||
// PromptInspection is the caller-owned result of [Engine.InspectPrompt].
|
||||
// It has no stable JSON representation.
|
||||
//
|
||||
// Inputs contains copied declared input metadata in definition order.
|
||||
// PromptVersion is caller-owned metadata: nil means no label was declared and
|
||||
// a non-nil empty string is explicit. Inputs contains copied declared input
|
||||
// metadata in definition order.
|
||||
// OutputContract is the normalized contract declared by the prompt definition,
|
||||
// rather than a request-level effective override. PromptHash is opaque.
|
||||
type PromptInspection struct {
|
||||
// PromptID is the normalized ID of the selected prompt definition.
|
||||
PromptID string
|
||||
// PromptVersion is the selected definition's descriptive version label.
|
||||
PromptVersion string
|
||||
// PromptVersion is the selected definition's descriptive version label. Nil
|
||||
// means no label was declared; a non-nil empty string is an explicit label.
|
||||
PromptVersion *string
|
||||
// PromptHash is the opaque equality value for the selected definition.
|
||||
PromptHash string
|
||||
// DefaultProfileID is declared metadata and is not resolved by inspection.
|
||||
|
||||
Reference in New Issue
Block a user