wingbot 3.76.4-alpha.4 → 3.76.4-alpha.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/package.json +2 -2
- package/src/LLM.js +6 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wingbot",
|
|
3
|
-
"version": "3.76.4-alpha.
|
|
3
|
+
"version": "3.76.4-alpha.5",
|
|
4
4
|
"description": "Enterprise Messaging Bot Conversation Engine",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -76,4 +76,4 @@
|
|
|
76
76
|
"axios": "^1.6.4",
|
|
77
77
|
"handlebars": "^4.0.0"
|
|
78
78
|
}
|
|
79
|
-
}
|
|
79
|
+
}
|
package/src/LLM.js
CHANGED
|
@@ -112,6 +112,7 @@ const LLMSession = require('./LLMSession');
|
|
|
112
112
|
/**
|
|
113
113
|
* @typedef {object} LLMLogOptions
|
|
114
114
|
* @prop {VectorSearchResult} [vectorSearchResult]
|
|
115
|
+
* @prop {ToolFunction[]} [tools]
|
|
115
116
|
*/
|
|
116
117
|
|
|
117
118
|
/**
|
|
@@ -158,6 +159,7 @@ const LLMSession = require('./LLMSession');
|
|
|
158
159
|
* @prop {LLMMessage[]} prompt
|
|
159
160
|
* @prop {LLMMessage} result
|
|
160
161
|
* @prop {VectorSearchResult} [vectorSearchResult]
|
|
162
|
+
* @prop {ToolFunction[]} [tools]
|
|
161
163
|
*/
|
|
162
164
|
|
|
163
165
|
/**
|
|
@@ -424,7 +426,7 @@ class LLM {
|
|
|
424
426
|
const opts = this.llmOptions(preset);
|
|
425
427
|
const prompt = await session.toArray(true);
|
|
426
428
|
const result = await this._provider.requestChat(prompt, opts, session.tools);
|
|
427
|
-
this.logPrompt(prompt, result, logOptions.vectorSearchResult);
|
|
429
|
+
this.logPrompt(prompt, result, logOptions.vectorSearchResult, session.tools);
|
|
428
430
|
return result;
|
|
429
431
|
}
|
|
430
432
|
|
|
@@ -433,11 +435,12 @@ class LLM {
|
|
|
433
435
|
* @param {LLMMessage[]} prompt
|
|
434
436
|
* @param {LLMMessage} result
|
|
435
437
|
* @param {VectorSearchResult} [vectorSearchResult]
|
|
438
|
+
* @param {ToolFunction[]} [tools]
|
|
436
439
|
*/
|
|
437
|
-
logPrompt (prompt, result, vectorSearchResult) {
|
|
440
|
+
logPrompt (prompt, result, vectorSearchResult, tools) {
|
|
438
441
|
this._lastResult = result;
|
|
439
442
|
this._configuration.logger.logPrompt({
|
|
440
|
-
prompt, result, vectorSearchResult
|
|
443
|
+
prompt, result, vectorSearchResult, tools
|
|
441
444
|
});
|
|
442
445
|
}
|
|
443
446
|
|