@ragbits/api-client 1.4.1 → 1.5.0
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/dist/autogen.types.d.ts +28 -1
- package/dist/index.cjs +3 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/autogen.types.d.ts
CHANGED
|
@@ -49,6 +49,12 @@ export interface ChatContext {
|
|
|
49
49
|
};
|
|
50
50
|
user: User | null;
|
|
51
51
|
session_id: string | null;
|
|
52
|
+
/**
|
|
53
|
+
* List of confirmed/declined tool executions from the frontend. Each entry has 'confirmation_id' and 'confirmed' (bool)
|
|
54
|
+
*/
|
|
55
|
+
tool_confirmations: {
|
|
56
|
+
[k: string]: unknown;
|
|
57
|
+
}[] | null;
|
|
52
58
|
/**
|
|
53
59
|
* User's timezone in IANA format (e.g., 'Europe/Warsaw', 'America/New_York')
|
|
54
60
|
*/
|
|
@@ -141,6 +147,17 @@ export interface MessageUsage {
|
|
|
141
147
|
completion_tokens: number;
|
|
142
148
|
total_tokens: number;
|
|
143
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Represents a tool confirmation request sent to the user.
|
|
152
|
+
*/
|
|
153
|
+
export interface ConfirmationRequest {
|
|
154
|
+
confirmation_id: string;
|
|
155
|
+
tool_name: string;
|
|
156
|
+
tool_description: string;
|
|
157
|
+
arguments: {
|
|
158
|
+
[k: string]: unknown;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
144
161
|
/**
|
|
145
162
|
* Text content wrapper.
|
|
146
163
|
*/
|
|
@@ -179,6 +196,12 @@ export interface UsageContent {
|
|
|
179
196
|
[k: string]: MessageUsage;
|
|
180
197
|
};
|
|
181
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* Confirmation request content wrapper.
|
|
201
|
+
*/
|
|
202
|
+
export interface ConfirmationRequestContent {
|
|
203
|
+
confirmation_request: ConfirmationRequest;
|
|
204
|
+
}
|
|
182
205
|
/**
|
|
183
206
|
* Error content wrapper for displaying error messages to users.
|
|
184
207
|
*/
|
|
@@ -476,6 +499,10 @@ export interface ConversationSummaryResponse {
|
|
|
476
499
|
type: 'conversation_summary';
|
|
477
500
|
content: ConversationSummaryContent;
|
|
478
501
|
}
|
|
502
|
+
export interface ConfirmationRequestChatResponse {
|
|
503
|
+
type: 'confirmation_request';
|
|
504
|
+
content: ConfirmationRequestContent;
|
|
505
|
+
}
|
|
479
506
|
export interface ErrorChatResponse {
|
|
480
507
|
type: 'error';
|
|
481
508
|
content: ErrorContent;
|
|
@@ -487,4 +514,4 @@ export interface ChunkedChatResponse {
|
|
|
487
514
|
/**
|
|
488
515
|
* Typed chat response union
|
|
489
516
|
*/
|
|
490
|
-
export type ChatResponse = TextChatResponse | ReferenceChatResponse | MessageIdChatResponse | ConversationIdChatResponse | StateUpdateChatResponse | LiveUpdateChatResponse | FollowupMessagesChatResponse | ImageChatResponse | MessageUsageChatResponse | ClearMessageChatResponse | ConversationSummaryResponse | ErrorChatResponse;
|
|
517
|
+
export type ChatResponse = TextChatResponse | ReferenceChatResponse | MessageIdChatResponse | ConversationIdChatResponse | StateUpdateChatResponse | LiveUpdateChatResponse | FollowupMessagesChatResponse | ImageChatResponse | MessageUsageChatResponse | ClearMessageChatResponse | ConversationSummaryResponse | ConfirmationRequestChatResponse | ErrorChatResponse;
|
package/dist/index.cjs
CHANGED
|
@@ -49,11 +49,13 @@ var AuthType = {
|
|
|
49
49
|
|
|
50
50
|
// src/index.ts
|
|
51
51
|
var RagbitsClient = class {
|
|
52
|
+
baseUrl;
|
|
53
|
+
auth;
|
|
54
|
+
chunkQueue = /* @__PURE__ */ new Map();
|
|
52
55
|
/**
|
|
53
56
|
* @param config - Configuration object
|
|
54
57
|
*/
|
|
55
58
|
constructor(config = {}) {
|
|
56
|
-
this.chunkQueue = /* @__PURE__ */ new Map();
|
|
57
59
|
this.baseUrl = config.baseUrl ?? "";
|
|
58
60
|
this.auth = config.auth;
|
|
59
61
|
if (this.baseUrl.endsWith("/")) {
|
package/dist/index.js
CHANGED
|
@@ -19,11 +19,13 @@ var AuthType = {
|
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var RagbitsClient = class {
|
|
22
|
+
baseUrl;
|
|
23
|
+
auth;
|
|
24
|
+
chunkQueue = /* @__PURE__ */ new Map();
|
|
22
25
|
/**
|
|
23
26
|
* @param config - Configuration object
|
|
24
27
|
*/
|
|
25
28
|
constructor(config = {}) {
|
|
26
|
-
this.chunkQueue = /* @__PURE__ */ new Map();
|
|
27
29
|
this.baseUrl = config.baseUrl ?? "";
|
|
28
30
|
this.auth = config.auth;
|
|
29
31
|
if (this.baseUrl.endsWith("/")) {
|