get the message of the system role for generative tasks.
(ctx: String)
| 117 | |
| 118 | /// get the message of the system role for generative tasks. |
| 119 | pub fn get_sys_gen_message(ctx: String) -> String { |
| 120 | let deopt = Deopt::new(get_library_name()).unwrap(); |
| 121 | let mut template = config::SYSTEM_GEN_TEMPLATE.to_string(); |
| 122 | let mut ctx_template = config::SYSTEM_CONTEXT_TEMPLATE.replace("{project}", &get_library_name()); |
| 123 | if let Some(desc) = deopt.config.desc { |
| 124 | ctx_template.insert_str(0, &desc); |
| 125 | } |
| 126 | let ctx_template = ctx_template.replace("{headers}", &get_include_sys_headers_str()); |
| 127 | let ctx_template = ctx_template.replace("{APIs}", &dump_func_gadgets_tostr()); |
| 128 | let ctx_template = ctx_template.replace("{context}", &ctx); |
| 129 | template.push_str("\n\n"); |
| 130 | template.push_str(&ctx_template); |
| 131 | |
| 132 | template |
| 133 | } |
| 134 | |
| 135 | /// get the type definitions in args of the apis of the combination. |
| 136 | fn get_combination_definitions(combination: &Vec<&FuncGadget>) -> String { |
no test coverage detected