@pushwoosh/rpc-gateway-ai-assistant 0.1.432 → 0.1.433
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 +30 -0
- package/package.json +1 -1
- package/pushwoosh_accounts_assistant_v1.d.ts +27 -0
package/data.js
CHANGED
|
@@ -3523,6 +3523,12 @@ export const data = {
|
|
|
3523
3523
|
},
|
|
3524
3524
|
"handoffChildChatId": {
|
|
3525
3525
|
"type": "number"
|
|
3526
|
+
},
|
|
3527
|
+
"activeTurnId": {
|
|
3528
|
+
"type": "string"
|
|
3529
|
+
},
|
|
3530
|
+
"turnUserMessageId": {
|
|
3531
|
+
"type": "number"
|
|
3526
3532
|
}
|
|
3527
3533
|
}
|
|
3528
3534
|
},
|
|
@@ -3656,6 +3662,20 @@ export const data = {
|
|
|
3656
3662
|
}
|
|
3657
3663
|
}
|
|
3658
3664
|
},
|
|
3665
|
+
"pushwoosh.accounts.assistant.v1.AttachTurnRequest": {
|
|
3666
|
+
"type": "I",
|
|
3667
|
+
"fields": {
|
|
3668
|
+
"chatId": {
|
|
3669
|
+
"type": "number"
|
|
3670
|
+
},
|
|
3671
|
+
"turnId": {
|
|
3672
|
+
"type": "string"
|
|
3673
|
+
},
|
|
3674
|
+
"afterEventId": {
|
|
3675
|
+
"type": "string"
|
|
3676
|
+
}
|
|
3677
|
+
}
|
|
3678
|
+
},
|
|
3659
3679
|
"pushwoosh.accounts.assistant.v1.FileAttachment": {
|
|
3660
3680
|
"type": "I",
|
|
3661
3681
|
"fields": {
|
|
@@ -3786,6 +3806,9 @@ export const data = {
|
|
|
3786
3806
|
},
|
|
3787
3807
|
"reloadView": {
|
|
3788
3808
|
"type": "pushwoosh.accounts.assistant.v1.ReloadView"
|
|
3809
|
+
},
|
|
3810
|
+
"eventId": {
|
|
3811
|
+
"type": "string"
|
|
3789
3812
|
}
|
|
3790
3813
|
}
|
|
3791
3814
|
},
|
|
@@ -4047,6 +4070,13 @@ export const data = {
|
|
|
4047
4070
|
"method": "post",
|
|
4048
4071
|
"path": "/api/v1/applications/{application}/chats/{chat_id}/turn/cancel"
|
|
4049
4072
|
},
|
|
4073
|
+
"AttachTurn": {
|
|
4074
|
+
"request": "pushwoosh.accounts.assistant.v1.AttachTurnRequest",
|
|
4075
|
+
"response": "pushwoosh.accounts.assistant.v1.InferenceResponse",
|
|
4076
|
+
"method": "post",
|
|
4077
|
+
"path": "/api/v1/chats/{chat_id}/turn/attach",
|
|
4078
|
+
"serverStreaming": true
|
|
4079
|
+
},
|
|
4050
4080
|
"StreamInference": {
|
|
4051
4081
|
"request": "pushwoosh.accounts.assistant.v1.InferenceRequest",
|
|
4052
4082
|
"response": "pushwoosh.accounts.assistant.v1.InferenceResponse",
|
package/package.json
CHANGED
|
@@ -65,6 +65,16 @@ export type Chat = {
|
|
|
65
65
|
* and return that chat. Zero means no handoff yet.
|
|
66
66
|
*/
|
|
67
67
|
handoffChildChatId: number;
|
|
68
|
+
/**
|
|
69
|
+
* active_turn_id names the turn still answering in this chat, empty when none is. Follow it
|
|
70
|
+
* with AttachTurn; the chat stays busy until it ends.
|
|
71
|
+
*/
|
|
72
|
+
activeTurnId: string;
|
|
73
|
+
/**
|
|
74
|
+
* turn_user_message_id is the running turn's user message (GetChat only). Messages after it
|
|
75
|
+
* belong to that turn and arrive through AttachTurn; 0 means it has not written one yet.
|
|
76
|
+
*/
|
|
77
|
+
turnUserMessageId: number;
|
|
68
78
|
};
|
|
69
79
|
/** CreateChatRequest for creating a new chat */
|
|
70
80
|
export type CreateChatRequest = {
|
|
@@ -133,6 +143,14 @@ export type CancelTurnRequest = {
|
|
|
133
143
|
export type CancelTurnResponse = {
|
|
134
144
|
cancelled: boolean;
|
|
135
145
|
};
|
|
146
|
+
/** AttachTurnRequest follows a running turn — from its start, or after the last event seen. */
|
|
147
|
+
export type AttachTurnRequest = {
|
|
148
|
+
chatId: number;
|
|
149
|
+
/** Chat.active_turn_id */
|
|
150
|
+
turnId: string;
|
|
151
|
+
/** InferenceResponse.event_id of the last event seen; empty replays all */
|
|
152
|
+
afterEventId: string;
|
|
153
|
+
};
|
|
136
154
|
/** FileAttachment represents a file uploaded by the user */
|
|
137
155
|
export type FileAttachment = {
|
|
138
156
|
filename: string;
|
|
@@ -199,6 +217,8 @@ export type InferenceResponse = {
|
|
|
199
217
|
actions: SuggestedAction[];
|
|
200
218
|
/** Set on STREAM_EVENT_RELOAD_VIEW */
|
|
201
219
|
reloadView: ReloadView;
|
|
220
|
+
/** Set by AttachTurn; pass the last one back as after_event_id to resume */
|
|
221
|
+
eventId: string;
|
|
202
222
|
};
|
|
203
223
|
export type GetConsentRequest = {
|
|
204
224
|
application: string;
|
|
@@ -412,6 +432,13 @@ export interface AssistantService {
|
|
|
412
432
|
* detached-turns flag, so closing the stream no longer stops it.
|
|
413
433
|
*/
|
|
414
434
|
CancelTurn: AssistantService_CancelTurn;
|
|
435
|
+
/**
|
|
436
|
+
* Follow a turn still answering; ends with the turn's own status. NotFound: its events expired,
|
|
437
|
+
* Aborted: its pod died, FailedPrecondition: too long to follow live — reload the chat.
|
|
438
|
+
*/
|
|
439
|
+
AttachTurn(request: AttachTurnRequest, options?: {
|
|
440
|
+
signal?: AbortSignal;
|
|
441
|
+
}): Promise<AsyncIterable<InferenceResponse>>;
|
|
415
442
|
/** Stream AI inference responses */
|
|
416
443
|
StreamInference(request: InferenceRequest, options?: {
|
|
417
444
|
signal?: AbortSignal;
|