utilitas 1998.2.56 → 1998.2.57
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/utilitas.lite.mjs +1 -1
- package/dist/utilitas.lite.mjs.map +1 -1
- package/lib/alan.mjs +5 -4
- package/lib/manifest.mjs +1 -1
- package/package.json +1 -1
package/lib/alan.mjs
CHANGED
|
@@ -865,8 +865,9 @@ const buildPrompts = async (model, input, options = {}) => {
|
|
|
865
865
|
};
|
|
866
866
|
|
|
867
867
|
const handleToolsCall = async (msg, options) => {
|
|
868
|
-
let [content, preRes, input, packMsg, toolsResponse, responded] = [
|
|
869
|
-
[], [], [], null, options?.result ? options?.result.trim() : '',
|
|
868
|
+
let [content, preRes, input, packMsg, toolsResponse, responded, callIdx] = [
|
|
869
|
+
[], [], [], null, options?.result ? options?.result.trim() : '',
|
|
870
|
+
false, 0,
|
|
870
871
|
];
|
|
871
872
|
const resp = async m => {
|
|
872
873
|
m = `\n${m}`;
|
|
@@ -913,7 +914,7 @@ const handleToolsCall = async (msg, options) => {
|
|
|
913
914
|
}
|
|
914
915
|
const name = (fn?.function || fn?.functionCall || fn)?.name;
|
|
915
916
|
if (!name) { continue; }
|
|
916
|
-
await resp(
|
|
917
|
+
await resp(`${callIdx++ ? '\n' : ''}Name: ${name}`);
|
|
917
918
|
const f = tools.find(x => insensitiveCompare(
|
|
918
919
|
x.def?.function?.name || x?.def?.name, name
|
|
919
920
|
));
|
|
@@ -944,7 +945,7 @@ const handleToolsCall = async (msg, options) => {
|
|
|
944
945
|
case GEMINI: content = [{ role: FUNC, parts: content }]; break;
|
|
945
946
|
}
|
|
946
947
|
}
|
|
947
|
-
responded && await resp(
|
|
948
|
+
responded && await resp(TOOLS_END);
|
|
948
949
|
}
|
|
949
950
|
return {
|
|
950
951
|
toolsResult: [...content.length ? preRes : [], ...content],
|
package/lib/manifest.mjs
CHANGED