symposium 0.4.4 → 0.4.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/Model.js +6 -4
- package/models/AnthropicModel.js +1 -1
- package/package.json +1 -1
package/Model.js
CHANGED
|
@@ -19,12 +19,14 @@ export default class Model {
|
|
|
19
19
|
|
|
20
20
|
promptFromFunctions(functions) {
|
|
21
21
|
if (!functions.length)
|
|
22
|
-
return
|
|
22
|
+
return '';
|
|
23
23
|
|
|
24
|
-
let message = "Hai a disposizione
|
|
24
|
+
let message = "Hai a disposizione alcune funzioni che puoi chiamare per ottenere risposte o compiere azioni. Per chiamare una funzione scrivi un messaggio che inizia con CALL nome_funzione e a capo inserisci il JSON con gli argomenti; delimitando il tutto da 3 caratteri ``` - ad esempio:\n" +
|
|
25
|
+
"```\n" +
|
|
25
26
|
"CALL create_user\n" +
|
|
26
|
-
'{"name":"test"}' + "\n
|
|
27
|
-
"
|
|
27
|
+
'{"name":"test"}' + "\n" +
|
|
28
|
+
"```\n\n" +
|
|
29
|
+
"Lista delle funzioni che hai a disposizione:\n";
|
|
28
30
|
|
|
29
31
|
for (let f of functions)
|
|
30
32
|
message += '- ' + f.name + "\n " + f.description + "\n";
|
package/models/AnthropicModel.js
CHANGED
|
@@ -20,7 +20,7 @@ export default class AnthropicModel extends Model {
|
|
|
20
20
|
if (functions.length && !this.supports_functions) {
|
|
21
21
|
// Se il modello non supporta nativamente le funzioni, aggiungo il prompt al messaggio di sistema
|
|
22
22
|
const functions_prompt = this.promptFromFunctions(functions);
|
|
23
|
-
system += functions_prompt;
|
|
23
|
+
system += "\n\n" + functions_prompt;
|
|
24
24
|
functions = [];
|
|
25
25
|
}
|
|
26
26
|
|