@sprucelabs/sprucebot-llm 15.1.9 → 15.1.10
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.
|
@@ -103,6 +103,7 @@ export default class ResponseParserV2 {
|
|
|
103
103
|
return `Updating state works similar to all function calls. Use the following syntax:
|
|
104
104
|
@updateState { "field1": "value1", "field2": "value2" }
|
|
105
105
|
Make sure to json encode only the fields you want to change. You can update state once and do it at the end of any messages you send. IMPORTANT: JSON must be on a single line. Do NOT use multi-line or formatted JSON.
|
|
106
|
+
Your user-facing message is always sent to the user, even if @updateState fails. If @updateState fails later, do not repeat the same message. Only send the specific @updateState needed to fix the missing state change.
|
|
106
107
|
Good example:
|
|
107
108
|
@updateState { "favoriteColor": "blue", "firstName": "Taylor" }
|
|
108
109
|
Bad examples:
|
|
@@ -117,6 +118,7 @@ Bad examples:
|
|
|
117
118
|
return `A function call is done using the following syntax:
|
|
118
119
|
@callback { "name": "callbackName", "options": {} }
|
|
119
120
|
Make sure to json encode the options and include the name of the callback you want to call. You can call as many callbacks as you want in a single response by including multiple @callback lines. IMPORTANT: JSON must be on a single line. Do NOT use multi-line or formatted JSON. Also, do NOT call something like @myCallback. You would call it like this: @callback { "name": "myCallback", "options": {} }
|
|
121
|
+
Your user-facing message is always sent to the user, even if a callback fails. Successful callbacks have already run successfully. If a callback fails later, do not repeat the same message and do not repeat successful callbacks. Only call the specific callback needed to fix the failed gap.
|
|
120
122
|
Good example:
|
|
121
123
|
@callback { "name": "lookupWeather", "options": { "zip": "80524" } }
|
|
122
124
|
Bad examples:
|
|
@@ -95,6 +95,7 @@ class ResponseParserV2 {
|
|
|
95
95
|
return `Updating state works similar to all function calls. Use the following syntax:
|
|
96
96
|
@updateState { "field1": "value1", "field2": "value2" }
|
|
97
97
|
Make sure to json encode only the fields you want to change. You can update state once and do it at the end of any messages you send. IMPORTANT: JSON must be on a single line. Do NOT use multi-line or formatted JSON.
|
|
98
|
+
Your user-facing message is always sent to the user, even if @updateState fails. If @updateState fails later, do not repeat the same message. Only send the specific @updateState needed to fix the missing state change.
|
|
98
99
|
Good example:
|
|
99
100
|
@updateState { "favoriteColor": "blue", "firstName": "Taylor" }
|
|
100
101
|
Bad examples:
|
|
@@ -109,6 +110,7 @@ Bad examples:
|
|
|
109
110
|
return `A function call is done using the following syntax:
|
|
110
111
|
@callback { "name": "callbackName", "options": {} }
|
|
111
112
|
Make sure to json encode the options and include the name of the callback you want to call. You can call as many callbacks as you want in a single response by including multiple @callback lines. IMPORTANT: JSON must be on a single line. Do NOT use multi-line or formatted JSON. Also, do NOT call something like @myCallback. You would call it like this: @callback { "name": "myCallback", "options": {} }
|
|
113
|
+
Your user-facing message is always sent to the user, even if a callback fails. Successful callbacks have already run successfully. If a callback fails later, do not repeat the same message and do not repeat successful callbacks. Only call the specific callback needed to fix the failed gap.
|
|
112
114
|
Good example:
|
|
113
115
|
@callback { "name": "lookupWeather", "options": { "zip": "80524" } }
|
|
114
116
|
Bad examples:
|