utilitas 2000.3.56 → 2000.3.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 -0
- package/lib/manifest.mjs +1 -1
- package/package.json +1 -1
package/lib/alan.mjs
CHANGED
|
@@ -1340,6 +1340,11 @@ const prompt = async (input, options = {}) => {
|
|
|
1340
1340
|
const tag = packModelLabel([ai.provider, ai.model.source, ai.model.name]);
|
|
1341
1341
|
options.log && log(`Prompt ${tag}: ${JSON.stringify(input || '[ATTACHMENTS]')}`);
|
|
1342
1342
|
const resp = await ai.prompt(input, options);
|
|
1343
|
+
const msgs = options?.messages || [];
|
|
1344
|
+
const [rag_msgs, ctx_msgs] = [
|
|
1345
|
+
msgs.filter(x => !!x.score).length, msgs.filter(x => !x.score).length
|
|
1346
|
+
];
|
|
1347
|
+
options.log && log(`w/ RAG: ${rag_msgs}, context: ${ctx_msgs}, attachments: ${~~options?.attachments?.length}.`);
|
|
1343
1348
|
options.log && log(`Response ${tag}: ${JSON.stringify(resp.text)}`);
|
|
1344
1349
|
return resp;
|
|
1345
1350
|
};
|
package/lib/manifest.mjs
CHANGED