ai_json_template/
rigorous_json_command_builder.rs1crate::ix!();
3
4pub struct RigorousJsonCommandBuilder;
5
6impl RigorousJsonCommandBuilder {
7
8 pub fn instructions<T:AiJsonTemplate>() -> String {
9 let stages = RigorousJsonCommandBuilderStage::all();
10 let mut x: Vec<String> = Vec::new();
11 for stage in stages {
12 let schema_template = T::to_template();
13 x.push(stage.ai_instructions(&schema_template));
14 }
15 x.join("\n")
16 }
17
18 pub fn instructions_with_justification<T:AiJsonTemplateWithJustification>() -> String {
19 let stages = RigorousJsonCommandBuilderStage::all();
20 let mut x: Vec<String> = Vec::new();
21 for stage in stages {
22 let schema_template = T::to_template_with_justification();
23 x.push(stage.ai_instructions(&schema_template));
24 }
25 x.join("\n")
26 }
27}