@ax-llm/ax 11.0.12 → 11.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -4845,16 +4845,10 @@ var AxPromptTemplate = class {
4845
4845
  this.sig = sig;
4846
4846
  this.fieldTemplates = fieldTemplates;
4847
4847
  const task = [];
4848
- const desc = this.sig.getDescription();
4849
- if (desc) {
4850
- const capitalized = capitalizeFirstLetter(desc.trim());
4851
- task.push(capitalized.endsWith(".") ? capitalized : capitalized + ".");
4852
- }
4853
4848
  const inArgs = this.renderDescFields(this.sig.getInputFields());
4854
4849
  const outArgs = this.renderDescFields(this.sig.getOutputFields());
4855
4850
  task.push(
4856
- `## Processing Instructions
4857
- You will be provided with the following fields: ${inArgs}. Your task is to generate new fields: ${outArgs}.`
4851
+ `You will be provided with the following fields: ${inArgs}. Your task is to generate new fields: ${outArgs}.`
4858
4852
  );
4859
4853
  const funcs = functions?.map(
4860
4854
  (f) => "toFunction" in f ? f.toFunction() : f
@@ -4876,6 +4870,13 @@ ${outputFields}`);
4876
4870
  task.push(functionCallInstructions.trim());
4877
4871
  }
4878
4872
  task.push(formattingRules.trim());
4873
+ const desc = this.sig.getDescription();
4874
+ if (desc) {
4875
+ const capitalized = capitalizeFirstLetter(desc.trim());
4876
+ const text = capitalized.endsWith(".") ? capitalized : capitalized + ".";
4877
+ task.push(`---
4878
+ ${text}`);
4879
+ }
4879
4880
  this.task = {
4880
4881
  type: "text",
4881
4882
  text: task.join("\n\n")
@@ -5120,7 +5121,7 @@ ${outputFields}`);
5120
5121
  const type = field.type?.name ? toFieldType(field.type) : "string";
5121
5122
  const required = field.isOptional ? "optional" : "required";
5122
5123
  const description = field.description ? `: ${capitalizeFirstLetter(field.description)}` : "";
5123
- return `- \`${name}\` (${type}, ${required})${description}.`.trim();
5124
+ return `- \`${name}:\` (${type}, ${required}) ${description}.`.trim();
5124
5125
  });
5125
5126
  return rows.join("\n");
5126
5127
  };