Carry repair provenance through application workflows
This commit is contained in:
@@ -9,14 +9,15 @@ import (
|
||||
|
||||
func dailyDefinition() Definition {
|
||||
return Definition{
|
||||
ID: Daily,
|
||||
Name: "Daily Report",
|
||||
PromptID: "weather.daily_generated_text",
|
||||
PromptVersion: "2.0.0",
|
||||
TemplateID: "daily",
|
||||
GeneratedTextSchemaID: "daily",
|
||||
ArtifactGroup: "daily",
|
||||
OutputName: "daily.md",
|
||||
ID: Daily,
|
||||
Name: "Daily Report",
|
||||
PromptID: "weather.daily_generated_text",
|
||||
PromptVersion: "2.0.0",
|
||||
TemplateID: "daily",
|
||||
GeneratedTextSchemaID: "daily",
|
||||
GeneratedTextRepairAttempts: 0,
|
||||
ArtifactGroup: "daily",
|
||||
OutputName: "daily.md",
|
||||
DistributorPathTemplates: []string{
|
||||
"daily/{valid_start_date}/{run_id}.md",
|
||||
"daily/{valid_start_date}/index.md",
|
||||
|
||||
@@ -27,20 +27,21 @@ const (
|
||||
)
|
||||
|
||||
type Definition struct {
|
||||
ID ID
|
||||
Name string
|
||||
PromptID string
|
||||
PromptVersion string
|
||||
TemplateID string
|
||||
GeneratedTextSchemaID string
|
||||
ArtifactGroup string
|
||||
OutputName string
|
||||
DistributorPathTemplates []string
|
||||
Modules []module.ConfigItem
|
||||
Morning bool
|
||||
Evening bool
|
||||
resolve func(ResolveRequest) (timeutil.Period, error)
|
||||
runIDDisambiguator func(Resolved) string
|
||||
ID ID
|
||||
Name string
|
||||
PromptID string
|
||||
PromptVersion string
|
||||
TemplateID string
|
||||
GeneratedTextSchemaID string
|
||||
GeneratedTextRepairAttempts int
|
||||
ArtifactGroup string
|
||||
OutputName string
|
||||
DistributorPathTemplates []string
|
||||
Modules []module.ConfigItem
|
||||
Morning bool
|
||||
Evening bool
|
||||
resolve func(ResolveRequest) (timeutil.Period, error)
|
||||
runIDDisambiguator func(Resolved) string
|
||||
}
|
||||
|
||||
func (r Resolved) OutputName() (string, error) {
|
||||
|
||||
@@ -11,14 +11,15 @@ const hourlyReportHours = 6
|
||||
|
||||
func hourlyDefinition() Definition {
|
||||
return Definition{
|
||||
ID: Hourly,
|
||||
Name: "Hourly Report",
|
||||
PromptID: "weather.hourly_generated_text",
|
||||
PromptVersion: "2.0.0",
|
||||
TemplateID: "hourly",
|
||||
GeneratedTextSchemaID: "hourly",
|
||||
ArtifactGroup: "hourly",
|
||||
OutputName: "hourly.md",
|
||||
ID: Hourly,
|
||||
Name: "Hourly Report",
|
||||
PromptID: "weather.hourly_generated_text",
|
||||
PromptVersion: "2.0.0",
|
||||
TemplateID: "hourly",
|
||||
GeneratedTextSchemaID: "hourly",
|
||||
GeneratedTextRepairAttempts: 0,
|
||||
ArtifactGroup: "hourly",
|
||||
OutputName: "hourly.md",
|
||||
DistributorPathTemplates: []string{
|
||||
"hourly/index.md",
|
||||
},
|
||||
|
||||
@@ -91,6 +91,9 @@ func TestRegistryContainsOnlyPromptBackedReports(t *testing.T) {
|
||||
if definition.TemplateID == "" || definition.GeneratedTextSchemaID == "" {
|
||||
t.Fatalf("%s template/schema = %q/%q, want both set", definition.ID, definition.TemplateID, definition.GeneratedTextSchemaID)
|
||||
}
|
||||
if definition.GeneratedTextRepairAttempts != 0 {
|
||||
t.Fatalf("%s repair attempts = %d, want 0", definition.ID, definition.GeneratedTextRepairAttempts)
|
||||
}
|
||||
}
|
||||
|
||||
if _, err := registry.Lookup(ID("three_day")); err == nil {
|
||||
|
||||
@@ -7,14 +7,15 @@ import (
|
||||
|
||||
func todayDefinition() Definition {
|
||||
return Definition{
|
||||
ID: Today,
|
||||
Name: "Today Report",
|
||||
PromptID: "weather.today_generated_text",
|
||||
PromptVersion: "2.0.0",
|
||||
TemplateID: "today",
|
||||
GeneratedTextSchemaID: "today",
|
||||
ArtifactGroup: "today",
|
||||
OutputName: "today.md",
|
||||
ID: Today,
|
||||
Name: "Today Report",
|
||||
PromptID: "weather.today_generated_text",
|
||||
PromptVersion: "2.0.0",
|
||||
TemplateID: "today",
|
||||
GeneratedTextSchemaID: "today",
|
||||
GeneratedTextRepairAttempts: 0,
|
||||
ArtifactGroup: "today",
|
||||
OutputName: "today.md",
|
||||
DistributorPathTemplates: []string{
|
||||
"daily/{valid_start_date}/{run_id}.md",
|
||||
"daily/{valid_start_date}/index.md",
|
||||
|
||||
@@ -7,14 +7,15 @@ import (
|
||||
|
||||
func tomorrowDefinition() Definition {
|
||||
return Definition{
|
||||
ID: Tomorrow,
|
||||
Name: "Tomorrow Report",
|
||||
PromptID: "weather.tomorrow_generated_text",
|
||||
PromptVersion: "2.0.0",
|
||||
TemplateID: "tomorrow",
|
||||
GeneratedTextSchemaID: "tomorrow",
|
||||
ArtifactGroup: "tomorrow",
|
||||
OutputName: "tomorrow.md",
|
||||
ID: Tomorrow,
|
||||
Name: "Tomorrow Report",
|
||||
PromptID: "weather.tomorrow_generated_text",
|
||||
PromptVersion: "2.0.0",
|
||||
TemplateID: "tomorrow",
|
||||
GeneratedTextSchemaID: "tomorrow",
|
||||
GeneratedTextRepairAttempts: 0,
|
||||
ArtifactGroup: "tomorrow",
|
||||
OutputName: "tomorrow.md",
|
||||
DistributorPathTemplates: []string{
|
||||
"daily/{valid_start_date}/{run_id}.md",
|
||||
"daily/{valid_start_date}/index.md",
|
||||
|
||||
Reference in New Issue
Block a user