@pushwoosh/rpc-gateway-ai-assistant 0.1.121 → 0.1.123
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/data.js +27 -0
- package/package.json +1 -1
- package/pushwoosh_accounts_assistant_v1.d.ts +39 -2
package/data.js
CHANGED
|
@@ -920,6 +920,12 @@ export const data = {
|
|
|
920
920
|
},
|
|
921
921
|
"prompt": {
|
|
922
922
|
"type": "string"
|
|
923
|
+
},
|
|
924
|
+
"url": {
|
|
925
|
+
"type": "string"
|
|
926
|
+
},
|
|
927
|
+
"primary": {
|
|
928
|
+
"type": "boolean"
|
|
923
929
|
}
|
|
924
930
|
}
|
|
925
931
|
},
|
|
@@ -941,6 +947,9 @@ export const data = {
|
|
|
941
947
|
},
|
|
942
948
|
"updatedAt": {
|
|
943
949
|
"type": "Date"
|
|
950
|
+
},
|
|
951
|
+
"isOnboarding": {
|
|
952
|
+
"type": "boolean"
|
|
944
953
|
}
|
|
945
954
|
}
|
|
946
955
|
},
|
|
@@ -952,6 +961,9 @@ export const data = {
|
|
|
952
961
|
},
|
|
953
962
|
"title": {
|
|
954
963
|
"type": "string"
|
|
964
|
+
},
|
|
965
|
+
"isOnboarding": {
|
|
966
|
+
"type": "boolean"
|
|
955
967
|
}
|
|
956
968
|
}
|
|
957
969
|
},
|
|
@@ -1242,6 +1254,14 @@ export const data = {
|
|
|
1242
1254
|
}
|
|
1243
1255
|
}
|
|
1244
1256
|
},
|
|
1257
|
+
"pushwoosh.accounts.assistant.v1.OnboardingIntroRequest": {
|
|
1258
|
+
"type": "I",
|
|
1259
|
+
"fields": {
|
|
1260
|
+
"chatId": {
|
|
1261
|
+
"type": "number"
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
},
|
|
1245
1265
|
"pushwoosh.accounts.assistant.v1.AssistantService": {
|
|
1246
1266
|
"type": "S",
|
|
1247
1267
|
"key": "assistant",
|
|
@@ -1333,6 +1353,13 @@ export const data = {
|
|
|
1333
1353
|
"response": "pushwoosh.accounts.assistant.v1.CheckUsageAllowedResponse",
|
|
1334
1354
|
"method": "get",
|
|
1335
1355
|
"path": "/api/v1/applications/{application}/usage-allowed"
|
|
1356
|
+
},
|
|
1357
|
+
"StreamOnboardingIntro": {
|
|
1358
|
+
"request": "pushwoosh.accounts.assistant.v1.OnboardingIntroRequest",
|
|
1359
|
+
"response": "pushwoosh.accounts.assistant.v1.InferenceResponse",
|
|
1360
|
+
"method": "post",
|
|
1361
|
+
"path": "/api/v1/chats/{chat_id}/onboarding/intro",
|
|
1362
|
+
"serverStreaming": true
|
|
1336
1363
|
}
|
|
1337
1364
|
}
|
|
1338
1365
|
}
|
package/package.json
CHANGED
|
@@ -18,13 +18,18 @@ export type Message = {
|
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* SuggestedAction represents a model-proposed follow-up action shown as a button.
|
|
21
|
-
* id is a stable slug used for analytics; label is the button text
|
|
22
|
-
*
|
|
21
|
+
* id is a stable slug used for analytics; label is the button text.
|
|
22
|
+
* Exactly one of prompt or url must be set:
|
|
23
|
+
* - prompt: literal user message dispatched when the button is clicked.
|
|
24
|
+
* - url: external link (e.g. documentation) opened when the button is clicked.
|
|
25
|
+
* primary marks the visually emphasised CTA — at most one per actions block.
|
|
23
26
|
*/
|
|
24
27
|
export type SuggestedAction = {
|
|
25
28
|
id: string;
|
|
26
29
|
label: string;
|
|
27
30
|
prompt: string;
|
|
31
|
+
url: string;
|
|
32
|
+
primary: boolean;
|
|
28
33
|
};
|
|
29
34
|
/** Chat represents a conversation with its metadata and messages */
|
|
30
35
|
export type Chat = {
|
|
@@ -33,11 +38,24 @@ export type Chat = {
|
|
|
33
38
|
messages: Message[];
|
|
34
39
|
createdAt: Date;
|
|
35
40
|
updatedAt: Date;
|
|
41
|
+
/**
|
|
42
|
+
* is_onboarding flags this chat as the account's onboarding chat.
|
|
43
|
+
* Frontend uses it to decide whether to call StreamOnboardingIntro on the
|
|
44
|
+
* first turn and may render the chat with onboarding-specific UI.
|
|
45
|
+
*/
|
|
46
|
+
isOnboarding: boolean;
|
|
36
47
|
};
|
|
37
48
|
/** CreateChatRequest for creating a new chat */
|
|
38
49
|
export type CreateChatRequest = {
|
|
39
50
|
application: string;
|
|
40
51
|
title: string;
|
|
52
|
+
/**
|
|
53
|
+
* is_onboarding requests the onboarding chat for the calling account.
|
|
54
|
+
* The server seeds the chat with the account's onboarding plan snapshot.
|
|
55
|
+
* At most one onboarding chat exists per account: if one already exists,
|
|
56
|
+
* the server returns it instead of creating a new chat.
|
|
57
|
+
*/
|
|
58
|
+
isOnboarding: boolean;
|
|
41
59
|
};
|
|
42
60
|
/** CreateChatResponse returns the created chat */
|
|
43
61
|
export type CreateChatResponse = {
|
|
@@ -168,6 +186,15 @@ export type CheckUsageAllowedResponse = {
|
|
|
168
186
|
allowed: boolean;
|
|
169
187
|
reason: string;
|
|
170
188
|
};
|
|
189
|
+
/**
|
|
190
|
+
* OnboardingIntroRequest triggers the onboarding chat's first turn —
|
|
191
|
+
* 3 assistant messages plus a set of suggested actions — generated from
|
|
192
|
+
* the account's onboarding plan. Must reference a chat created with
|
|
193
|
+
* is_onboarding=true that has no message history yet.
|
|
194
|
+
*/
|
|
195
|
+
export type OnboardingIntroRequest = {
|
|
196
|
+
chatId: number;
|
|
197
|
+
};
|
|
171
198
|
export type AssistantService_CreateChat = RpcMethod<CreateChatRequest, CreateChatResponse>;
|
|
172
199
|
export type AssistantService_GetChat = RpcMethod<GetChatRequest, GetChatResponse>;
|
|
173
200
|
export type AssistantService_GetAllChats = RpcMethod<GetAllChatsRequest, GetAllChatsResponse>;
|
|
@@ -208,4 +235,14 @@ export interface AssistantService {
|
|
|
208
235
|
GiveConsent: AssistantService_GiveConsent;
|
|
209
236
|
CompactifyContext: AssistantService_CompactifyContext;
|
|
210
237
|
CheckUsageAllowed: AssistantService_CheckUsageAllowed;
|
|
238
|
+
/**
|
|
239
|
+
* StreamOnboardingIntro generates the onboarding chat's first turn —
|
|
240
|
+
* 3 assistant messages and suggested actions — using the self-hosted
|
|
241
|
+
* Qwen model. Frontend must call this exactly once after CreateChat
|
|
242
|
+
* with is_onboarding=true on a chat that has no message history.
|
|
243
|
+
* Subsequent turns go through the regular StreamInference* RPCs.
|
|
244
|
+
*/
|
|
245
|
+
StreamOnboardingIntro(request: OnboardingIntroRequest, options?: {
|
|
246
|
+
signal?: AbortSignal;
|
|
247
|
+
}): Promise<AsyncIterable<InferenceResponse>>;
|
|
211
248
|
}
|