@breign/client 1.0.86 → 1.0.88
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/apis/AppApi.d.ts +8 -6
- package/dist/apis/AppApi.js +14 -8
- package/dist/apis/PromptsApi.d.ts +6 -3
- package/dist/apis/PromptsApi.js +15 -6
- package/dist/models/ChatMessageUio.d.ts +7 -0
- package/dist/models/ChatMessageUio.js +3 -0
- package/dist/models/ChatUio.d.ts +7 -0
- package/dist/models/ChatUio.js +3 -0
- package/dist/models/ConversationMessagesInnerUio.d.ts +7 -0
- package/dist/models/ConversationMessagesInnerUio.js +3 -0
- package/dist/models/ConversationUio.d.ts +7 -0
- package/dist/models/ConversationUio.js +3 -0
- package/dist/models/TokenUsageUio.d.ts +50 -0
- package/dist/models/TokenUsageUio.js +62 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/openapi.json +81 -2
- package/package.json +1 -1
package/dist/apis/AppApi.d.ts
CHANGED
|
@@ -37,11 +37,13 @@ export interface CreateAppChatRequest {
|
|
|
37
37
|
appId: string;
|
|
38
38
|
appChatCreateRequestUio: AppChatCreateRequestUio;
|
|
39
39
|
instanceId?: string;
|
|
40
|
+
ephemeral?: boolean;
|
|
40
41
|
}
|
|
41
42
|
export interface CreateAppFlowRequest {
|
|
42
43
|
appId: string;
|
|
43
44
|
appFlowCreateRequestUio: AppFlowCreateRequestUio;
|
|
44
45
|
instanceId?: string;
|
|
46
|
+
ephemeral?: boolean;
|
|
45
47
|
}
|
|
46
48
|
export interface CreateInstanceRequest {
|
|
47
49
|
appId: string;
|
|
@@ -210,17 +212,17 @@ export declare class AppApi extends runtime.BaseAPI {
|
|
|
210
212
|
* Initialize a chat
|
|
211
213
|
* Initialize a chat
|
|
212
214
|
*/
|
|
213
|
-
createAppChat(appId: string, appChatCreateRequestUio: AppChatCreateRequestUio, instanceId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppChatCreateResponseUio>;
|
|
215
|
+
createAppChat(appId: string, appChatCreateRequestUio: AppChatCreateRequestUio, instanceId?: string, ephemeral?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppChatCreateResponseUio>;
|
|
214
216
|
/**
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
+
* Start a conversation with a flow.
|
|
218
|
+
* Start a chat with a flow
|
|
217
219
|
*/
|
|
218
220
|
createAppFlowRaw(requestParameters: CreateAppFlowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FlowUio>>;
|
|
219
221
|
/**
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
+
* Start a conversation with a flow.
|
|
223
|
+
* Start a chat with a flow
|
|
222
224
|
*/
|
|
223
|
-
createAppFlow(appId: string, appFlowCreateRequestUio: AppFlowCreateRequestUio, instanceId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FlowUio>;
|
|
225
|
+
createAppFlow(appId: string, appFlowCreateRequestUio: AppFlowCreateRequestUio, instanceId?: string, ephemeral?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FlowUio>;
|
|
224
226
|
/**
|
|
225
227
|
* Create instance
|
|
226
228
|
* Create instance
|
package/dist/apis/AppApi.js
CHANGED
|
@@ -242,6 +242,9 @@ class AppApi extends runtime.BaseAPI {
|
|
|
242
242
|
if (requestParameters['instanceId'] != null) {
|
|
243
243
|
queryParameters['instanceId'] = requestParameters['instanceId'];
|
|
244
244
|
}
|
|
245
|
+
if (requestParameters['ephemeral'] != null) {
|
|
246
|
+
queryParameters['ephemeral'] = requestParameters['ephemeral'];
|
|
247
|
+
}
|
|
245
248
|
const headerParameters = {};
|
|
246
249
|
headerParameters['Content-Type'] = 'application/json';
|
|
247
250
|
if (this.configuration && this.configuration.apiKey) {
|
|
@@ -260,13 +263,13 @@ class AppApi extends runtime.BaseAPI {
|
|
|
260
263
|
* Initialize a chat
|
|
261
264
|
* Initialize a chat
|
|
262
265
|
*/
|
|
263
|
-
async createAppChat(appId, appChatCreateRequestUio, instanceId, initOverrides) {
|
|
264
|
-
const response = await this.createAppChatRaw({ appId: appId, appChatCreateRequestUio: appChatCreateRequestUio, instanceId: instanceId }, initOverrides);
|
|
266
|
+
async createAppChat(appId, appChatCreateRequestUio, instanceId, ephemeral, initOverrides) {
|
|
267
|
+
const response = await this.createAppChatRaw({ appId: appId, appChatCreateRequestUio: appChatCreateRequestUio, instanceId: instanceId, ephemeral: ephemeral }, initOverrides);
|
|
265
268
|
return await response.value();
|
|
266
269
|
}
|
|
267
270
|
/**
|
|
268
|
-
*
|
|
269
|
-
*
|
|
271
|
+
* Start a conversation with a flow.
|
|
272
|
+
* Start a chat with a flow
|
|
270
273
|
*/
|
|
271
274
|
async createAppFlowRaw(requestParameters, initOverrides) {
|
|
272
275
|
if (requestParameters['appId'] == null) {
|
|
@@ -279,6 +282,9 @@ class AppApi extends runtime.BaseAPI {
|
|
|
279
282
|
if (requestParameters['instanceId'] != null) {
|
|
280
283
|
queryParameters['instanceId'] = requestParameters['instanceId'];
|
|
281
284
|
}
|
|
285
|
+
if (requestParameters['ephemeral'] != null) {
|
|
286
|
+
queryParameters['ephemeral'] = requestParameters['ephemeral'];
|
|
287
|
+
}
|
|
282
288
|
const headerParameters = {};
|
|
283
289
|
headerParameters['Content-Type'] = 'application/json';
|
|
284
290
|
if (this.configuration && this.configuration.apiKey) {
|
|
@@ -294,11 +300,11 @@ class AppApi extends runtime.BaseAPI {
|
|
|
294
300
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FlowUioFromJSON)(jsonValue));
|
|
295
301
|
}
|
|
296
302
|
/**
|
|
297
|
-
*
|
|
298
|
-
*
|
|
303
|
+
* Start a conversation with a flow.
|
|
304
|
+
* Start a chat with a flow
|
|
299
305
|
*/
|
|
300
|
-
async createAppFlow(appId, appFlowCreateRequestUio, instanceId, initOverrides) {
|
|
301
|
-
const response = await this.createAppFlowRaw({ appId: appId, appFlowCreateRequestUio: appFlowCreateRequestUio, instanceId: instanceId }, initOverrides);
|
|
306
|
+
async createAppFlow(appId, appFlowCreateRequestUio, instanceId, ephemeral, initOverrides) {
|
|
307
|
+
const response = await this.createAppFlowRaw({ appId: appId, appFlowCreateRequestUio: appFlowCreateRequestUio, instanceId: instanceId, ephemeral: ephemeral }, initOverrides);
|
|
302
308
|
return await response.value();
|
|
303
309
|
}
|
|
304
310
|
/**
|
|
@@ -14,15 +14,18 @@ import type { BodyWithIdUio, ChatMessageUio, Conversation1Uio, MessageUio, Promp
|
|
|
14
14
|
export interface CreateConversationRequest {
|
|
15
15
|
agentId: string;
|
|
16
16
|
promptFlowCreateRequestUio: PromptFlowCreateRequestUio;
|
|
17
|
+
ephemeral?: boolean;
|
|
17
18
|
}
|
|
18
19
|
export interface CreateConversationWithFlowManagementRequest {
|
|
19
20
|
agentId: string;
|
|
20
21
|
promptFlowCreateRequestUio: PromptFlowCreateRequestUio;
|
|
22
|
+
ephemeral?: boolean;
|
|
21
23
|
}
|
|
22
24
|
export interface CreatePromptRequest {
|
|
23
25
|
agentId: string;
|
|
24
26
|
promptCreateRequestUio: PromptCreateRequestUio;
|
|
25
27
|
async?: boolean;
|
|
28
|
+
ephemeral?: boolean;
|
|
26
29
|
}
|
|
27
30
|
export interface GetConversationByIdRequest {
|
|
28
31
|
conversationId: string;
|
|
@@ -53,7 +56,7 @@ export declare class PromptsApi extends runtime.BaseAPI {
|
|
|
53
56
|
* Create a new empty conversation for the specified agent.
|
|
54
57
|
* Create a new conversation
|
|
55
58
|
*/
|
|
56
|
-
createConversation(agentId: string, promptFlowCreateRequestUio: PromptFlowCreateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BodyWithIdUio>;
|
|
59
|
+
createConversation(agentId: string, promptFlowCreateRequestUio: PromptFlowCreateRequestUio, ephemeral?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BodyWithIdUio>;
|
|
57
60
|
/**
|
|
58
61
|
* Starts a new conversation session for the specified agent with flow management
|
|
59
62
|
* Create a new conversation with flow management
|
|
@@ -63,7 +66,7 @@ export declare class PromptsApi extends runtime.BaseAPI {
|
|
|
63
66
|
* Starts a new conversation session for the specified agent with flow management
|
|
64
67
|
* Create a new conversation with flow management
|
|
65
68
|
*/
|
|
66
|
-
createConversationWithFlowManagement(agentId: string, promptFlowCreateRequestUio: PromptFlowCreateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PromptFlowCreateResponseUio>;
|
|
69
|
+
createConversationWithFlowManagement(agentId: string, promptFlowCreateRequestUio: PromptFlowCreateRequestUio, ephemeral?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PromptFlowCreateResponseUio>;
|
|
67
70
|
/**
|
|
68
71
|
* Starts a new conversation session for the specified agent
|
|
69
72
|
* Create a new prompt
|
|
@@ -73,7 +76,7 @@ export declare class PromptsApi extends runtime.BaseAPI {
|
|
|
73
76
|
* Starts a new conversation session for the specified agent
|
|
74
77
|
* Create a new prompt
|
|
75
78
|
*/
|
|
76
|
-
createPrompt(agentId: string, promptCreateRequestUio: PromptCreateRequestUio, async?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PromptCreateResponseUio>;
|
|
79
|
+
createPrompt(agentId: string, promptCreateRequestUio: PromptCreateRequestUio, async?: boolean, ephemeral?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PromptCreateResponseUio>;
|
|
77
80
|
/**
|
|
78
81
|
* Retrieves details of a specific conversation including all messages
|
|
79
82
|
* Get a conversation by ID
|
package/dist/apis/PromptsApi.js
CHANGED
|
@@ -65,6 +65,9 @@ class PromptsApi extends runtime.BaseAPI {
|
|
|
65
65
|
throw new runtime.RequiredError('promptFlowCreateRequestUio', 'Required parameter "promptFlowCreateRequestUio" was null or undefined when calling createConversation().');
|
|
66
66
|
}
|
|
67
67
|
const queryParameters = {};
|
|
68
|
+
if (requestParameters['ephemeral'] != null) {
|
|
69
|
+
queryParameters['ephemeral'] = requestParameters['ephemeral'];
|
|
70
|
+
}
|
|
68
71
|
const headerParameters = {};
|
|
69
72
|
headerParameters['Content-Type'] = 'application/json';
|
|
70
73
|
if (this.configuration && this.configuration.apiKey) {
|
|
@@ -83,8 +86,8 @@ class PromptsApi extends runtime.BaseAPI {
|
|
|
83
86
|
* Create a new empty conversation for the specified agent.
|
|
84
87
|
* Create a new conversation
|
|
85
88
|
*/
|
|
86
|
-
async createConversation(agentId, promptFlowCreateRequestUio, initOverrides) {
|
|
87
|
-
const response = await this.createConversationRaw({ agentId: agentId, promptFlowCreateRequestUio: promptFlowCreateRequestUio }, initOverrides);
|
|
89
|
+
async createConversation(agentId, promptFlowCreateRequestUio, ephemeral, initOverrides) {
|
|
90
|
+
const response = await this.createConversationRaw({ agentId: agentId, promptFlowCreateRequestUio: promptFlowCreateRequestUio, ephemeral: ephemeral }, initOverrides);
|
|
88
91
|
return await response.value();
|
|
89
92
|
}
|
|
90
93
|
/**
|
|
@@ -99,6 +102,9 @@ class PromptsApi extends runtime.BaseAPI {
|
|
|
99
102
|
throw new runtime.RequiredError('promptFlowCreateRequestUio', 'Required parameter "promptFlowCreateRequestUio" was null or undefined when calling createConversationWithFlowManagement().');
|
|
100
103
|
}
|
|
101
104
|
const queryParameters = {};
|
|
105
|
+
if (requestParameters['ephemeral'] != null) {
|
|
106
|
+
queryParameters['ephemeral'] = requestParameters['ephemeral'];
|
|
107
|
+
}
|
|
102
108
|
const headerParameters = {};
|
|
103
109
|
headerParameters['Content-Type'] = 'application/json';
|
|
104
110
|
if (this.configuration && this.configuration.apiKey) {
|
|
@@ -117,8 +123,8 @@ class PromptsApi extends runtime.BaseAPI {
|
|
|
117
123
|
* Starts a new conversation session for the specified agent with flow management
|
|
118
124
|
* Create a new conversation with flow management
|
|
119
125
|
*/
|
|
120
|
-
async createConversationWithFlowManagement(agentId, promptFlowCreateRequestUio, initOverrides) {
|
|
121
|
-
const response = await this.createConversationWithFlowManagementRaw({ agentId: agentId, promptFlowCreateRequestUio: promptFlowCreateRequestUio }, initOverrides);
|
|
126
|
+
async createConversationWithFlowManagement(agentId, promptFlowCreateRequestUio, ephemeral, initOverrides) {
|
|
127
|
+
const response = await this.createConversationWithFlowManagementRaw({ agentId: agentId, promptFlowCreateRequestUio: promptFlowCreateRequestUio, ephemeral: ephemeral }, initOverrides);
|
|
122
128
|
return await response.value();
|
|
123
129
|
}
|
|
124
130
|
/**
|
|
@@ -136,6 +142,9 @@ class PromptsApi extends runtime.BaseAPI {
|
|
|
136
142
|
if (requestParameters['async'] != null) {
|
|
137
143
|
queryParameters['async'] = requestParameters['async'];
|
|
138
144
|
}
|
|
145
|
+
if (requestParameters['ephemeral'] != null) {
|
|
146
|
+
queryParameters['ephemeral'] = requestParameters['ephemeral'];
|
|
147
|
+
}
|
|
139
148
|
const headerParameters = {};
|
|
140
149
|
headerParameters['Content-Type'] = 'application/json';
|
|
141
150
|
if (this.configuration && this.configuration.apiKey) {
|
|
@@ -154,8 +163,8 @@ class PromptsApi extends runtime.BaseAPI {
|
|
|
154
163
|
* Starts a new conversation session for the specified agent
|
|
155
164
|
* Create a new prompt
|
|
156
165
|
*/
|
|
157
|
-
async createPrompt(agentId, promptCreateRequestUio, async, initOverrides) {
|
|
158
|
-
const response = await this.createPromptRaw({ agentId: agentId, promptCreateRequestUio: promptCreateRequestUio, async: async }, initOverrides);
|
|
166
|
+
async createPrompt(agentId, promptCreateRequestUio, async, ephemeral, initOverrides) {
|
|
167
|
+
const response = await this.createPromptRaw({ agentId: agentId, promptCreateRequestUio: promptCreateRequestUio, async: async, ephemeral: ephemeral }, initOverrides);
|
|
159
168
|
return await response.value();
|
|
160
169
|
}
|
|
161
170
|
/**
|
|
@@ -16,6 +16,7 @@ import type { ChatMessageRoleUio } from './ChatMessageRoleUio';
|
|
|
16
16
|
import type { FileAttachmentUio } from './FileAttachmentUio';
|
|
17
17
|
import type { ChatMessageAudioInnerUio } from './ChatMessageAudioInnerUio';
|
|
18
18
|
import type { ToolResultsUio } from './ToolResultsUio';
|
|
19
|
+
import type { TokenUsageUio } from './TokenUsageUio';
|
|
19
20
|
/**
|
|
20
21
|
*
|
|
21
22
|
* @export
|
|
@@ -130,6 +131,12 @@ export interface ChatMessageUio {
|
|
|
130
131
|
* @memberof ChatMessageUio
|
|
131
132
|
*/
|
|
132
133
|
reasoning?: string | null;
|
|
134
|
+
/**
|
|
135
|
+
*
|
|
136
|
+
* @type {TokenUsageUio}
|
|
137
|
+
* @memberof ChatMessageUio
|
|
138
|
+
*/
|
|
139
|
+
usage?: TokenUsageUio;
|
|
133
140
|
}
|
|
134
141
|
/**
|
|
135
142
|
* Check if a given object implements the ChatMessageUio interface.
|
|
@@ -25,6 +25,7 @@ const ChatMessageRoleUio_1 = require("./ChatMessageRoleUio");
|
|
|
25
25
|
const FileAttachmentUio_1 = require("./FileAttachmentUio");
|
|
26
26
|
const ChatMessageAudioInnerUio_1 = require("./ChatMessageAudioInnerUio");
|
|
27
27
|
const ToolResultsUio_1 = require("./ToolResultsUio");
|
|
28
|
+
const TokenUsageUio_1 = require("./TokenUsageUio");
|
|
28
29
|
/**
|
|
29
30
|
* Check if a given object implements the ChatMessageUio interface.
|
|
30
31
|
*/
|
|
@@ -65,6 +66,7 @@ function ChatMessageUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
65
66
|
'audio': json['audio'] == null ? undefined : (json['audio'].map(ChatMessageAudioInnerUio_1.ChatMessageAudioInnerUioFromJSON)),
|
|
66
67
|
'stream': json['stream'] == null ? undefined : (0, ChatMessageStreamUio_1.ChatMessageStreamUioFromJSON)(json['stream']),
|
|
67
68
|
'reasoning': json['reasoning'] == null ? undefined : json['reasoning'],
|
|
69
|
+
'usage': json['usage'] == null ? undefined : (0, TokenUsageUio_1.TokenUsageUioFromJSON)(json['usage']),
|
|
68
70
|
};
|
|
69
71
|
}
|
|
70
72
|
function ChatMessageUioToJSON(json) {
|
|
@@ -93,5 +95,6 @@ function ChatMessageUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
93
95
|
'audio': value['audio'] == null ? undefined : (value['audio'].map(ChatMessageAudioInnerUio_1.ChatMessageAudioInnerUioToJSON)),
|
|
94
96
|
'stream': (0, ChatMessageStreamUio_1.ChatMessageStreamUioToJSON)(value['stream']),
|
|
95
97
|
'reasoning': value['reasoning'],
|
|
98
|
+
'usage': (0, TokenUsageUio_1.TokenUsageUioToJSON)(value['usage']),
|
|
96
99
|
};
|
|
97
100
|
}
|
package/dist/models/ChatUio.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { TokenUsageUio } from './TokenUsageUio';
|
|
12
13
|
import type { ChatContextUio } from './ChatContextUio';
|
|
13
14
|
import type { ChatMessageUio } from './ChatMessageUio';
|
|
14
15
|
/**
|
|
@@ -83,6 +84,12 @@ export interface ChatUio {
|
|
|
83
84
|
* @memberof ChatUio
|
|
84
85
|
*/
|
|
85
86
|
messages: Array<ChatMessageUio>;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @type {TokenUsageUio}
|
|
90
|
+
* @memberof ChatUio
|
|
91
|
+
*/
|
|
92
|
+
usage?: TokenUsageUio;
|
|
86
93
|
/**
|
|
87
94
|
*
|
|
88
95
|
* @type {string}
|
package/dist/models/ChatUio.js
CHANGED
|
@@ -18,6 +18,7 @@ exports.ChatUioFromJSON = ChatUioFromJSON;
|
|
|
18
18
|
exports.ChatUioFromJSONTyped = ChatUioFromJSONTyped;
|
|
19
19
|
exports.ChatUioToJSON = ChatUioToJSON;
|
|
20
20
|
exports.ChatUioToJSONTyped = ChatUioToJSONTyped;
|
|
21
|
+
const TokenUsageUio_1 = require("./TokenUsageUio");
|
|
21
22
|
const ChatContextUio_1 = require("./ChatContextUio");
|
|
22
23
|
const ChatMessageUio_1 = require("./ChatMessageUio");
|
|
23
24
|
/**
|
|
@@ -59,6 +60,7 @@ function ChatUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
59
60
|
'summary': json['summary'] == null ? undefined : json['summary'],
|
|
60
61
|
'init': json['init'] == null ? undefined : json['init'],
|
|
61
62
|
'messages': (json['messages'].map(ChatMessageUio_1.ChatMessageUioFromJSON)),
|
|
63
|
+
'usage': json['usage'] == null ? undefined : (0, TokenUsageUio_1.TokenUsageUioFromJSON)(json['usage']),
|
|
62
64
|
'createdAt': json['createdAt'],
|
|
63
65
|
'updatedAt': json['updatedAt'],
|
|
64
66
|
'context': (0, ChatContextUio_1.ChatContextUioFromJSON)(json['context']),
|
|
@@ -83,6 +85,7 @@ function ChatUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
83
85
|
'summary': value['summary'],
|
|
84
86
|
'init': value['init'],
|
|
85
87
|
'messages': (value['messages'].map(ChatMessageUio_1.ChatMessageUioToJSON)),
|
|
88
|
+
'usage': (0, TokenUsageUio_1.TokenUsageUioToJSON)(value['usage']),
|
|
86
89
|
'createdAt': value['createdAt'],
|
|
87
90
|
'updatedAt': value['updatedAt'],
|
|
88
91
|
'context': (0, ChatContextUio_1.ChatContextUioToJSON)(value['context']),
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import type { ConversationMessagesInnerSuggestionsInnerUio } from './ConversationMessagesInnerSuggestionsInnerUio';
|
|
13
13
|
import type { ChatMessageAudioInnerUio } from './ChatMessageAudioInnerUio';
|
|
14
14
|
import type { ConversationMessagesInnerFlowNodeUio } from './ConversationMessagesInnerFlowNodeUio';
|
|
15
|
+
import type { TokenUsageUio } from './TokenUsageUio';
|
|
15
16
|
/**
|
|
16
17
|
*
|
|
17
18
|
* @export
|
|
@@ -68,6 +69,12 @@ export interface ConversationMessagesInnerUio {
|
|
|
68
69
|
* @memberof ConversationMessagesInnerUio
|
|
69
70
|
*/
|
|
70
71
|
audio?: Array<ChatMessageAudioInnerUio>;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {TokenUsageUio}
|
|
75
|
+
* @memberof ConversationMessagesInnerUio
|
|
76
|
+
*/
|
|
77
|
+
usage?: TokenUsageUio;
|
|
71
78
|
}
|
|
72
79
|
/**
|
|
73
80
|
* Check if a given object implements the ConversationMessagesInnerUio interface.
|
|
@@ -21,6 +21,7 @@ exports.ConversationMessagesInnerUioToJSONTyped = ConversationMessagesInnerUioTo
|
|
|
21
21
|
const ConversationMessagesInnerSuggestionsInnerUio_1 = require("./ConversationMessagesInnerSuggestionsInnerUio");
|
|
22
22
|
const ChatMessageAudioInnerUio_1 = require("./ChatMessageAudioInnerUio");
|
|
23
23
|
const ConversationMessagesInnerFlowNodeUio_1 = require("./ConversationMessagesInnerFlowNodeUio");
|
|
24
|
+
const TokenUsageUio_1 = require("./TokenUsageUio");
|
|
24
25
|
/**
|
|
25
26
|
* Check if a given object implements the ConversationMessagesInnerUio interface.
|
|
26
27
|
*/
|
|
@@ -51,6 +52,7 @@ function ConversationMessagesInnerUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
52
|
'suggestions': json['suggestions'] == null ? undefined : (json['suggestions'].map(ConversationMessagesInnerSuggestionsInnerUio_1.ConversationMessagesInnerSuggestionsInnerUioFromJSON)),
|
|
52
53
|
'flowNode': json['flowNode'] == null ? undefined : (0, ConversationMessagesInnerFlowNodeUio_1.ConversationMessagesInnerFlowNodeUioFromJSON)(json['flowNode']),
|
|
53
54
|
'audio': json['audio'] == null ? undefined : (json['audio'].map(ChatMessageAudioInnerUio_1.ChatMessageAudioInnerUioFromJSON)),
|
|
55
|
+
'usage': json['usage'] == null ? undefined : (0, TokenUsageUio_1.TokenUsageUioFromJSON)(json['usage']),
|
|
54
56
|
};
|
|
55
57
|
}
|
|
56
58
|
function ConversationMessagesInnerUioToJSON(json) {
|
|
@@ -69,5 +71,6 @@ function ConversationMessagesInnerUioToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
69
71
|
'suggestions': value['suggestions'] == null ? undefined : (value['suggestions'].map(ConversationMessagesInnerSuggestionsInnerUio_1.ConversationMessagesInnerSuggestionsInnerUioToJSON)),
|
|
70
72
|
'flowNode': (0, ConversationMessagesInnerFlowNodeUio_1.ConversationMessagesInnerFlowNodeUioToJSON)(value['flowNode']),
|
|
71
73
|
'audio': value['audio'] == null ? undefined : (value['audio'].map(ChatMessageAudioInnerUio_1.ChatMessageAudioInnerUioToJSON)),
|
|
74
|
+
'usage': (0, TokenUsageUio_1.TokenUsageUioToJSON)(value['usage']),
|
|
72
75
|
};
|
|
73
76
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { ConversationMessagesInnerUio } from './ConversationMessagesInnerUio';
|
|
13
13
|
import type { ConversationMetricsInnerUio } from './ConversationMetricsInnerUio';
|
|
14
|
+
import type { TokenUsageUio } from './TokenUsageUio';
|
|
14
15
|
/**
|
|
15
16
|
*
|
|
16
17
|
* @export
|
|
@@ -59,6 +60,12 @@ export interface ConversationUio {
|
|
|
59
60
|
* @memberof ConversationUio
|
|
60
61
|
*/
|
|
61
62
|
messages: Array<ConversationMessagesInnerUio>;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {TokenUsageUio}
|
|
66
|
+
* @memberof ConversationUio
|
|
67
|
+
*/
|
|
68
|
+
usage?: TokenUsageUio;
|
|
62
69
|
/**
|
|
63
70
|
*
|
|
64
71
|
* @type {Array<ConversationMetricsInnerUio>}
|
|
@@ -20,6 +20,7 @@ exports.ConversationUioToJSON = ConversationUioToJSON;
|
|
|
20
20
|
exports.ConversationUioToJSONTyped = ConversationUioToJSONTyped;
|
|
21
21
|
const ConversationMessagesInnerUio_1 = require("./ConversationMessagesInnerUio");
|
|
22
22
|
const ConversationMetricsInnerUio_1 = require("./ConversationMetricsInnerUio");
|
|
23
|
+
const TokenUsageUio_1 = require("./TokenUsageUio");
|
|
23
24
|
/**
|
|
24
25
|
* Check if a given object implements the ConversationUio interface.
|
|
25
26
|
*/
|
|
@@ -51,6 +52,7 @@ function ConversationUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
52
|
'customUserId': json['customUserId'] == null ? undefined : json['customUserId'],
|
|
52
53
|
'title': json['title'] == null ? undefined : json['title'],
|
|
53
54
|
'messages': (json['messages'].map(ConversationMessagesInnerUio_1.ConversationMessagesInnerUioFromJSON)),
|
|
55
|
+
'usage': json['usage'] == null ? undefined : (0, TokenUsageUio_1.TokenUsageUioFromJSON)(json['usage']),
|
|
54
56
|
'metrics': json['metrics'] == null ? undefined : (json['metrics'].map(ConversationMetricsInnerUio_1.ConversationMetricsInnerUioFromJSON)),
|
|
55
57
|
'cost': json['cost'] == null ? undefined : json['cost'],
|
|
56
58
|
'createdAt': json['createdAt'],
|
|
@@ -72,6 +74,7 @@ function ConversationUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
72
74
|
'customUserId': value['customUserId'],
|
|
73
75
|
'title': value['title'],
|
|
74
76
|
'messages': (value['messages'].map(ConversationMessagesInnerUio_1.ConversationMessagesInnerUioToJSON)),
|
|
77
|
+
'usage': (0, TokenUsageUio_1.TokenUsageUioToJSON)(value['usage']),
|
|
75
78
|
'metrics': value['metrics'] == null ? undefined : (value['metrics'].map(ConversationMetricsInnerUio_1.ConversationMetricsInnerUioToJSON)),
|
|
76
79
|
'cost': value['cost'],
|
|
77
80
|
'createdAt': value['createdAt'],
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brain-client
|
|
3
|
+
* Api ands models for brain-app and brain-app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.0-SNAPSHOT
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface TokenUsageUio
|
|
16
|
+
*/
|
|
17
|
+
export interface TokenUsageUio {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof TokenUsageUio
|
|
22
|
+
*/
|
|
23
|
+
inputTokens: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof TokenUsageUio
|
|
28
|
+
*/
|
|
29
|
+
outputTokens: number;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof TokenUsageUio
|
|
34
|
+
*/
|
|
35
|
+
reasoningTokens: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof TokenUsageUio
|
|
40
|
+
*/
|
|
41
|
+
totalTokens: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the TokenUsageUio interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfTokenUsageUio(value: object): value is TokenUsageUio;
|
|
47
|
+
export declare function TokenUsageUioFromJSON(json: any): TokenUsageUio;
|
|
48
|
+
export declare function TokenUsageUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenUsageUio;
|
|
49
|
+
export declare function TokenUsageUioToJSON(json: any): TokenUsageUio;
|
|
50
|
+
export declare function TokenUsageUioToJSONTyped(value?: TokenUsageUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* brain-client
|
|
6
|
+
* Api ands models for brain-app and brain-app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.0.0-SNAPSHOT
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfTokenUsageUio = instanceOfTokenUsageUio;
|
|
17
|
+
exports.TokenUsageUioFromJSON = TokenUsageUioFromJSON;
|
|
18
|
+
exports.TokenUsageUioFromJSONTyped = TokenUsageUioFromJSONTyped;
|
|
19
|
+
exports.TokenUsageUioToJSON = TokenUsageUioToJSON;
|
|
20
|
+
exports.TokenUsageUioToJSONTyped = TokenUsageUioToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the TokenUsageUio interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfTokenUsageUio(value) {
|
|
25
|
+
if (!('inputTokens' in value) || value['inputTokens'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('outputTokens' in value) || value['outputTokens'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('reasoningTokens' in value) || value['reasoningTokens'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('totalTokens' in value) || value['totalTokens'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function TokenUsageUioFromJSON(json) {
|
|
36
|
+
return TokenUsageUioFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function TokenUsageUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'inputTokens': json['inputTokens'],
|
|
44
|
+
'outputTokens': json['outputTokens'],
|
|
45
|
+
'reasoningTokens': json['reasoningTokens'],
|
|
46
|
+
'totalTokens': json['totalTokens'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function TokenUsageUioToJSON(json) {
|
|
50
|
+
return TokenUsageUioToJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function TokenUsageUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'inputTokens': value['inputTokens'],
|
|
58
|
+
'outputTokens': value['outputTokens'],
|
|
59
|
+
'reasoningTokens': value['reasoningTokens'],
|
|
60
|
+
'totalTokens': value['totalTokens'],
|
|
61
|
+
};
|
|
62
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -229,6 +229,7 @@ export * from './SuggestionUio';
|
|
|
229
229
|
export * from './TTSRequestUio';
|
|
230
230
|
export * from './TTSResponseUio';
|
|
231
231
|
export * from './TextToSpeechProviderUio';
|
|
232
|
+
export * from './TokenUsageUio';
|
|
232
233
|
export * from './ToolActionUio';
|
|
233
234
|
export * from './ToolCreateRequestUio';
|
|
234
235
|
export * from './ToolResultUio';
|
package/dist/models/index.js
CHANGED
|
@@ -247,6 +247,7 @@ __exportStar(require("./SuggestionUio"), exports);
|
|
|
247
247
|
__exportStar(require("./TTSRequestUio"), exports);
|
|
248
248
|
__exportStar(require("./TTSResponseUio"), exports);
|
|
249
249
|
__exportStar(require("./TextToSpeechProviderUio"), exports);
|
|
250
|
+
__exportStar(require("./TokenUsageUio"), exports);
|
|
250
251
|
__exportStar(require("./ToolActionUio"), exports);
|
|
251
252
|
__exportStar(require("./ToolCreateRequestUio"), exports);
|
|
252
253
|
__exportStar(require("./ToolResultUio"), exports);
|
package/dist/openapi.json
CHANGED
|
@@ -1502,6 +1502,14 @@
|
|
|
1502
1502
|
"format" : "uuid",
|
|
1503
1503
|
"type" : "string"
|
|
1504
1504
|
}
|
|
1505
|
+
}, {
|
|
1506
|
+
"description" : "If true, the resource will not appear in history and will be deleted after a certain time.",
|
|
1507
|
+
"in" : "query",
|
|
1508
|
+
"name" : "ephemeral",
|
|
1509
|
+
"required" : false,
|
|
1510
|
+
"schema" : {
|
|
1511
|
+
"type" : "boolean"
|
|
1512
|
+
}
|
|
1505
1513
|
} ],
|
|
1506
1514
|
"requestBody" : {
|
|
1507
1515
|
"content" : {
|
|
@@ -1744,7 +1752,7 @@
|
|
|
1744
1752
|
},
|
|
1745
1753
|
"/apps/{appId}/flows" : {
|
|
1746
1754
|
"post" : {
|
|
1747
|
-
"description" : "
|
|
1755
|
+
"description" : "Start a conversation with a flow.",
|
|
1748
1756
|
"operationId" : "createAppFlow",
|
|
1749
1757
|
"parameters" : [ {
|
|
1750
1758
|
"description" : "ID of the app",
|
|
@@ -1761,6 +1769,14 @@
|
|
|
1761
1769
|
"schema" : {
|
|
1762
1770
|
"type" : "string"
|
|
1763
1771
|
}
|
|
1772
|
+
}, {
|
|
1773
|
+
"description" : "If true, the resource will not appear in history and will be deleted after a certain time.",
|
|
1774
|
+
"in" : "query",
|
|
1775
|
+
"name" : "ephemeral",
|
|
1776
|
+
"required" : false,
|
|
1777
|
+
"schema" : {
|
|
1778
|
+
"type" : "boolean"
|
|
1779
|
+
}
|
|
1764
1780
|
} ],
|
|
1765
1781
|
"requestBody" : {
|
|
1766
1782
|
"content" : {
|
|
@@ -1784,7 +1800,7 @@
|
|
|
1784
1800
|
"description" : "App Flow created successfully"
|
|
1785
1801
|
}
|
|
1786
1802
|
},
|
|
1787
|
-
"summary" : "
|
|
1803
|
+
"summary" : "Start a chat with a flow",
|
|
1788
1804
|
"tags" : [ "app" ]
|
|
1789
1805
|
}
|
|
1790
1806
|
},
|
|
@@ -1807,6 +1823,14 @@
|
|
|
1807
1823
|
"schema" : {
|
|
1808
1824
|
"type" : "string"
|
|
1809
1825
|
}
|
|
1826
|
+
}, {
|
|
1827
|
+
"description" : "If true, the resource will not appear in history and will be deleted after a certain time.",
|
|
1828
|
+
"in" : "query",
|
|
1829
|
+
"name" : "ephemeral",
|
|
1830
|
+
"required" : false,
|
|
1831
|
+
"schema" : {
|
|
1832
|
+
"type" : "boolean"
|
|
1833
|
+
}
|
|
1810
1834
|
} ],
|
|
1811
1835
|
"requestBody" : {
|
|
1812
1836
|
"content" : {
|
|
@@ -7379,6 +7403,14 @@
|
|
|
7379
7403
|
"format" : "uuid",
|
|
7380
7404
|
"type" : "string"
|
|
7381
7405
|
}
|
|
7406
|
+
}, {
|
|
7407
|
+
"description" : "If true, the resource will not appear in history and will be deleted after a certain time.",
|
|
7408
|
+
"in" : "query",
|
|
7409
|
+
"name" : "ephemeral",
|
|
7410
|
+
"required" : false,
|
|
7411
|
+
"schema" : {
|
|
7412
|
+
"type" : "boolean"
|
|
7413
|
+
}
|
|
7382
7414
|
} ],
|
|
7383
7415
|
"requestBody" : {
|
|
7384
7416
|
"content" : {
|
|
@@ -7442,6 +7474,14 @@
|
|
|
7442
7474
|
"schema" : {
|
|
7443
7475
|
"type" : "boolean"
|
|
7444
7476
|
}
|
|
7477
|
+
}, {
|
|
7478
|
+
"description" : "If true, the resource will not appear in history and will be deleted after a certain time.",
|
|
7479
|
+
"in" : "query",
|
|
7480
|
+
"name" : "ephemeral",
|
|
7481
|
+
"required" : false,
|
|
7482
|
+
"schema" : {
|
|
7483
|
+
"type" : "boolean"
|
|
7484
|
+
}
|
|
7445
7485
|
} ],
|
|
7446
7486
|
"requestBody" : {
|
|
7447
7487
|
"content" : {
|
|
@@ -7948,6 +7988,15 @@
|
|
|
7948
7988
|
"type" : "integer"
|
|
7949
7989
|
}
|
|
7950
7990
|
},
|
|
7991
|
+
"ephemeral" : {
|
|
7992
|
+
"description" : "If true, the resource will not appear in history and will be deleted after a certain time.",
|
|
7993
|
+
"in" : "query",
|
|
7994
|
+
"name" : "ephemeral",
|
|
7995
|
+
"required" : false,
|
|
7996
|
+
"schema" : {
|
|
7997
|
+
"type" : "boolean"
|
|
7998
|
+
}
|
|
7999
|
+
},
|
|
7951
8000
|
"instanceId" : {
|
|
7952
8001
|
"description" : "Instance id",
|
|
7953
8002
|
"in" : "query",
|
|
@@ -9440,6 +9489,9 @@
|
|
|
9440
9489
|
},
|
|
9441
9490
|
"type" : "array"
|
|
9442
9491
|
},
|
|
9492
|
+
"usage" : {
|
|
9493
|
+
"$ref" : "#/components/schemas/TokenUsage"
|
|
9494
|
+
},
|
|
9443
9495
|
"createdAt" : {
|
|
9444
9496
|
"type" : "string"
|
|
9445
9497
|
},
|
|
@@ -9525,6 +9577,9 @@
|
|
|
9525
9577
|
"reasoning" : {
|
|
9526
9578
|
"nullable" : true,
|
|
9527
9579
|
"type" : "string"
|
|
9580
|
+
},
|
|
9581
|
+
"usage" : {
|
|
9582
|
+
"$ref" : "#/components/schemas/TokenUsage"
|
|
9528
9583
|
}
|
|
9529
9584
|
},
|
|
9530
9585
|
"required" : [ "content", "id", "role", "timestamp" ],
|
|
@@ -9620,6 +9675,24 @@
|
|
|
9620
9675
|
"required" : [ "ext", "id", "key", "mimeType", "name", "size", "status", "type" ],
|
|
9621
9676
|
"type" : "object"
|
|
9622
9677
|
},
|
|
9678
|
+
"TokenUsage" : {
|
|
9679
|
+
"properties" : {
|
|
9680
|
+
"inputTokens" : {
|
|
9681
|
+
"type" : "number"
|
|
9682
|
+
},
|
|
9683
|
+
"outputTokens" : {
|
|
9684
|
+
"type" : "number"
|
|
9685
|
+
},
|
|
9686
|
+
"reasoningTokens" : {
|
|
9687
|
+
"type" : "number"
|
|
9688
|
+
},
|
|
9689
|
+
"totalTokens" : {
|
|
9690
|
+
"type" : "number"
|
|
9691
|
+
}
|
|
9692
|
+
},
|
|
9693
|
+
"required" : [ "inputTokens", "outputTokens", "reasoningTokens", "totalTokens" ],
|
|
9694
|
+
"type" : "object"
|
|
9695
|
+
},
|
|
9623
9696
|
"ChatContext" : {
|
|
9624
9697
|
"properties" : {
|
|
9625
9698
|
"attachments" : {
|
|
@@ -10314,6 +10387,9 @@
|
|
|
10314
10387
|
},
|
|
10315
10388
|
"type" : "array"
|
|
10316
10389
|
},
|
|
10390
|
+
"usage" : {
|
|
10391
|
+
"$ref" : "#/components/schemas/TokenUsage"
|
|
10392
|
+
},
|
|
10317
10393
|
"metrics" : {
|
|
10318
10394
|
"items" : {
|
|
10319
10395
|
"$ref" : "#/components/schemas/Conversation_metrics_inner"
|
|
@@ -12876,6 +12952,9 @@
|
|
|
12876
12952
|
"$ref" : "#/components/schemas/ChatMessage_audio_inner"
|
|
12877
12953
|
},
|
|
12878
12954
|
"type" : "array"
|
|
12955
|
+
},
|
|
12956
|
+
"usage" : {
|
|
12957
|
+
"$ref" : "#/components/schemas/TokenUsage"
|
|
12879
12958
|
}
|
|
12880
12959
|
},
|
|
12881
12960
|
"required" : [ "content", "id", "role", "timestamp" ],
|