@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 +3 -1
- package/package.json +1 -1
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
|
-
|
|
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) {
|