@graf-research/llm-runner 0.0.4 → 0.0.5

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/dist/multistep.js CHANGED
@@ -116,7 +116,9 @@ var NativeStep;
116
116
  function generateMultipleChoiceAnswerResolver(options) {
117
117
  return (response) => __awaiter(this, void 0, void 0, function* () {
118
118
  const list_options_answer = response.trim().split(/[\n,]/).map(s => s.trim());
119
- return options.sort((a, b) => b.length - a.length).filter(a => list_options_answer.includes(a));
119
+ const sorted_list = [...options].sort((a, b) => b.length - a.length);
120
+ const selected_data = sorted_list.filter(a => list_options_answer.includes(a));
121
+ return options.filter(b => selected_data.includes(b));
120
122
  });
121
123
  }
122
124
  function askMultipleChoiceAnswer(llm, q, options, session_id) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graf-research/llm-runner",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "build": "rm -rf dist && tsc",