@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.cjs CHANGED
@@ -848,15 +848,16 @@ var logResponse = (resp) => {
848
848
  if (r.functionCalls) {
849
849
  for (const [i, f] of r.functionCalls.entries()) {
850
850
  if (f.function.name) {
851
+ if (i > 0) {
852
+ process.stdout.write("\n\n");
853
+ }
851
854
  process.stdout.write(
852
- `
853
- Function ${i + 1} -> ${colorLog.greenBright(f.function.name)} `
855
+ `Function ${i + 1} -> ${colorLog.greenBright(f.function.name)} `
854
856
  );
855
857
  }
856
858
  if (f.function.params) {
857
- process.stdout.write(
858
- colorLog.greenBright(f.function.params)
859
- );
859
+ const params = typeof f.function.params === "string" ? f.function.params : JSON.stringify(f.function.params, null, 2);
860
+ process.stdout.write(`${colorLog.greenBright(params)}`);
860
861
  }
861
862
  }
862
863
  }
@@ -4125,7 +4126,9 @@ var AxPromptTemplate = class {
4125
4126
  const funcs = functions?.map(
4126
4127
  (f) => "toFunction" in f ? f.toFunction() : f
4127
4128
  );
4128
- const funcList = funcs?.map((fn) => `\`${fn.name}\`: ${capitalizeFirstLetter(fn.description)}`).join("\n");
4129
+ const funcList = funcs?.map(
4130
+ (fn) => `- \`${fn.name}\`: ${capitalizeFirstLetter(fn.description)}`
4131
+ ).join("\n");
4129
4132
  if (funcList && funcList.length > 0) {
4130
4133
  task.push(`## Available Functions
4131
4134
  ${funcList}`);