@graf-research/llm-runner 0.0.5 → 0.0.7
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 +3 -3
- package/package.json +1 -1
package/dist/multistep.js
CHANGED
|
@@ -116,9 +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
|
-
const
|
|
120
|
-
const selected_data =
|
|
121
|
-
return
|
|
119
|
+
const sorted_list_options_answer = [...list_options_answer].sort((a, b) => b.length - a.length);
|
|
120
|
+
const selected_data = sorted_list_options_answer.filter(a => options.includes(a));
|
|
121
|
+
return list_options_answer.filter(b => selected_data.includes(b));
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
function askMultipleChoiceAnswer(llm, q, options, session_id) {
|