@agent-smith/cli 0.0.53 → 0.0.54

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.
@@ -108,6 +108,16 @@ function _initTaskParams(params, inferParams) {
108
108
  conf.templateName = params.templateName;
109
109
  delete params.templateName;
110
110
  }
111
+ if (params?.m) {
112
+ if (params.m.includes("/")) {
113
+ const _s = params.m.split("/");
114
+ conf.modelname = _s[0];
115
+ conf.templateName = _s[1];
116
+ }
117
+ else {
118
+ conf.modelname = params.m;
119
+ }
120
+ }
111
121
  const ip = conf.inferParams;
112
122
  if (params?.inferParams) {
113
123
  for (const [k, v] of Object.entries(params.inferParams)) {
@@ -1,2 +1,2 @@
1
- declare function executeWorkflowCmd(name: string, args?: Array<any>, options?: any): Promise<any>;
1
+ declare function executeWorkflowCmd(name: string, args?: Array<any> | Record<string, any>, options?: any): Promise<any>;
2
2
  export { executeWorkflowCmd, };
@@ -12,7 +12,7 @@ async function executeWorkflowCmd(name, args = [], options = {}) {
12
12
  if (isDebug.value || isVerbose.value) {
13
13
  console.log("Running workflow", name, stepNames.length, "steps");
14
14
  }
15
- let params = {};
15
+ let params = Array.isArray(args) ? {} : args;
16
16
  let i = 0;
17
17
  const finalTaskIndex = stepNames.length + 1;
18
18
  let taskRes = {};
@@ -24,7 +24,7 @@ function parseInferenceArgs(args) {
24
24
  });
25
25
  break;
26
26
  default:
27
- throw new Error(`unknown arg ${a}`);
27
+ vars[k] = v;
28
28
  }
29
29
  }
30
30
  else {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@agent-smith/cli",
3
3
  "description": "Agent Smith: terminal client for language model agents",
4
4
  "repository": "https://github.com/synw/agent-smith",
5
- "version": "0.0.53",
5
+ "version": "0.0.54",
6
6
  "scripts": {
7
7
  "buildrl": "rm -rf dist/* && rollup -c",
8
8
  "build": "rm -rf dist/* && tsc",