@unboundcx/sdk 4.13.149 → 4.13.150
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 +1 -1
- package/services/ai.js +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.150",
|
|
4
4
|
"description": "Official JavaScript SDK for the Unbound API - A comprehensive toolkit for integrating with Unbound's communication, AI, and data management services",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
package/services/ai.js
CHANGED
|
@@ -86,6 +86,7 @@ export class GenerativeService {
|
|
|
86
86
|
qualityCheck,
|
|
87
87
|
isPublic,
|
|
88
88
|
usageContext,
|
|
89
|
+
reportContext,
|
|
89
90
|
}) {
|
|
90
91
|
this.sdk.validateParams(
|
|
91
92
|
{
|
|
@@ -114,6 +115,7 @@ export class GenerativeService {
|
|
|
114
115
|
qualityCheck,
|
|
115
116
|
isPublic,
|
|
116
117
|
usageContext,
|
|
118
|
+
reportContext,
|
|
117
119
|
},
|
|
118
120
|
{
|
|
119
121
|
prompt: { type: 'string', required: false },
|
|
@@ -143,6 +145,11 @@ export class GenerativeService {
|
|
|
143
145
|
// Telemetry-only (contracts §9): { feature?, taskId?, sipCallId?,
|
|
144
146
|
// queueId?, cdrId? } -- never affects the prompt/session/cache/response.
|
|
145
147
|
usageContext: { type: 'object', required: false },
|
|
148
|
+
// Ask panel (ask-panel.md §B): { reportKey, title, state, allowed }
|
|
149
|
+
// for the server to ground the system prompt and build the
|
|
150
|
+
// proposeReportChange tool schema's enums. Optional -- omitted for
|
|
151
|
+
// every non-reporting chat surface.
|
|
152
|
+
reportContext: { type: 'object', required: false },
|
|
146
153
|
},
|
|
147
154
|
);
|
|
148
155
|
|
|
@@ -176,6 +183,7 @@ export class GenerativeService {
|
|
|
176
183
|
// Only included when the caller actually passed one -- keeps the
|
|
177
184
|
// wire payload identical to today for every existing caller.
|
|
178
185
|
...(usageContext !== undefined ? { usageContext } : {}),
|
|
186
|
+
...(reportContext !== undefined ? { reportContext } : {}),
|
|
179
187
|
},
|
|
180
188
|
// Return raw response for streaming to allow client-side stream handling
|
|
181
189
|
returnRawResponse: stream === true,
|