Document request validation workflow
This commit is contained in:
@@ -48,12 +48,16 @@ func main() {
|
||||
exit(fmt.Errorf("required note input was not discovered before preparation"))
|
||||
}
|
||||
|
||||
prepared, err := engine.Prepare(context.Background(), promptkit.RunRequest{
|
||||
request := promptkit.RunRequest{
|
||||
PromptID: "example.prepare",
|
||||
Inputs: map[string]promptkit.ArtifactRef{
|
||||
"note": promptkit.Inline("Ada finished the migration review."),
|
||||
},
|
||||
})
|
||||
}
|
||||
if err := engine.ValidateRequest(context.Background(), request); err != nil {
|
||||
exit(err)
|
||||
}
|
||||
prepared, err := engine.Prepare(context.Background(), request)
|
||||
if err != nil {
|
||||
exit(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user