@ax-llm/ax 10.0.30 → 10.0.31

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.js CHANGED
@@ -754,15 +754,16 @@ var logResponse = (resp) => {
754
754
  if (r.functionCalls) {
755
755
  for (const [i, f] of r.functionCalls.entries()) {
756
756
  if (f.function.name) {
757
+ if (i > 0) {
758
+ process.stdout.write("\n\n");
759
+ }
757
760
  process.stdout.write(
758
- `
759
- Function ${i + 1} -> ${colorLog.greenBright(f.function.name)} `
761
+ `Function ${i + 1} -> ${colorLog.greenBright(f.function.name)} `
760
762
  );
761
763
  }
762
764
  if (f.function.params) {
763
- process.stdout.write(
764
- colorLog.greenBright(f.function.params)
765
- );
765
+ const params = typeof f.function.params === "string" ? f.function.params : JSON.stringify(f.function.params, null, 2);
766
+ process.stdout.write(`${colorLog.greenBright(params)}`);
766
767
  }
767
768
  }
768
769
  }
@@ -4031,7 +4032,9 @@ var AxPromptTemplate = class {
4031
4032
  const funcs = functions?.map(
4032
4033
  (f) => "toFunction" in f ? f.toFunction() : f
4033
4034
  );
4034
- const funcList = funcs?.map((fn) => `\`${fn.name}\`: ${capitalizeFirstLetter(fn.description)}`).join("\n");
4035
+ const funcList = funcs?.map(
4036
+ (fn) => `- \`${fn.name}\`: ${capitalizeFirstLetter(fn.description)}`
4037
+ ).join("\n");
4035
4038
  if (funcList && funcList.length > 0) {
4036
4039
  task.push(`## Available Functions
4037
4040
  ${funcList}`);