@breign/client 1.0.149 → 1.0.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/dist/models/ChatUio.d.ts +7 -0
- package/dist/models/ChatUio.js +3 -0
- package/dist/models/ConversationContextUsageUio.d.ts +59 -0
- package/dist/models/ConversationContextUsageUio.js +69 -0
- package/dist/models/MessageStatusUio.d.ts +7 -0
- package/dist/models/MessageStatusUio.js +3 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/openapi.json +34 -0
- package/package.json +1 -1
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 { ConversationContextUsageUio } from './ConversationContextUsageUio';
|
|
12
13
|
import type { TokenUsageUio } from './TokenUsageUio';
|
|
13
14
|
import type { ChatContextUio } from './ChatContextUio';
|
|
14
15
|
import type { ChatMessageUio } from './ChatMessageUio';
|
|
@@ -96,6 +97,12 @@ export interface ChatUio {
|
|
|
96
97
|
* @memberof ChatUio
|
|
97
98
|
*/
|
|
98
99
|
usage?: TokenUsageUio;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {ConversationContextUsageUio}
|
|
103
|
+
* @memberof ChatUio
|
|
104
|
+
*/
|
|
105
|
+
contextUsage?: ConversationContextUsageUio;
|
|
99
106
|
/**
|
|
100
107
|
*
|
|
101
108
|
* @type {string}
|
package/dist/models/ChatUio.js
CHANGED
|
@@ -19,6 +19,7 @@ exports.ChatUioFromJSON = ChatUioFromJSON;
|
|
|
19
19
|
exports.ChatUioFromJSONTyped = ChatUioFromJSONTyped;
|
|
20
20
|
exports.ChatUioToJSON = ChatUioToJSON;
|
|
21
21
|
exports.ChatUioToJSONTyped = ChatUioToJSONTyped;
|
|
22
|
+
const ConversationContextUsageUio_1 = require("./ConversationContextUsageUio");
|
|
22
23
|
const TokenUsageUio_1 = require("./TokenUsageUio");
|
|
23
24
|
const ChatContextUio_1 = require("./ChatContextUio");
|
|
24
25
|
const ChatMessageUio_1 = require("./ChatMessageUio");
|
|
@@ -70,6 +71,7 @@ function ChatUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
70
71
|
'init': json['init'] == null ? undefined : json['init'],
|
|
71
72
|
'messages': (json['messages'].map(ChatMessageUio_1.ChatMessageUioFromJSON)),
|
|
72
73
|
'usage': json['usage'] == null ? undefined : (0, TokenUsageUio_1.TokenUsageUioFromJSON)(json['usage']),
|
|
74
|
+
'contextUsage': json['contextUsage'] == null ? undefined : (0, ConversationContextUsageUio_1.ConversationContextUsageUioFromJSON)(json['contextUsage']),
|
|
73
75
|
'createdAt': json['createdAt'],
|
|
74
76
|
'updatedAt': json['updatedAt'],
|
|
75
77
|
'context': (0, ChatContextUio_1.ChatContextUioFromJSON)(json['context']),
|
|
@@ -96,6 +98,7 @@ function ChatUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
96
98
|
'init': value['init'],
|
|
97
99
|
'messages': (value['messages'].map(ChatMessageUio_1.ChatMessageUioToJSON)),
|
|
98
100
|
'usage': (0, TokenUsageUio_1.TokenUsageUioToJSON)(value['usage']),
|
|
101
|
+
'contextUsage': (0, ConversationContextUsageUio_1.ConversationContextUsageUioToJSON)(value['contextUsage']),
|
|
99
102
|
'createdAt': value['createdAt'],
|
|
100
103
|
'updatedAt': value['updatedAt'],
|
|
101
104
|
'context': (0, ChatContextUio_1.ChatContextUioToJSON)(value['context']),
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
* How much of the model's context window this conversation occupies: the prompt of the last generation call, not the conversation's cumulated token count. Absent until a turn has been measured — an unmeasured conversation has an unknown occupancy, not an empty window.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ConversationContextUsageUio
|
|
16
|
+
*/
|
|
17
|
+
export interface ConversationContextUsageUio {
|
|
18
|
+
/**
|
|
19
|
+
* Prompt of the last generation call, in tokens, as reported by the provider. Always > 0.
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ConversationContextUsageUio
|
|
22
|
+
*/
|
|
23
|
+
usedTokens: number;
|
|
24
|
+
/**
|
|
25
|
+
* Context window of the conversation's model, in tokens. Always greater than 0.
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ConversationContextUsageUio
|
|
28
|
+
*/
|
|
29
|
+
contextWindow: number;
|
|
30
|
+
/**
|
|
31
|
+
* Where the window above comes from. `declared`: carried by the model definition. `catalog`: known to the backend only. `fallback`: unknown, shown as an approximation.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ConversationContextUsageUio
|
|
34
|
+
*/
|
|
35
|
+
contextWindowConfidence: ConversationContextUsageUioContextWindowConfidenceEnum;
|
|
36
|
+
/**
|
|
37
|
+
* Model the conversation runs on, absent when its engine reference resolves to none.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ConversationContextUsageUio
|
|
40
|
+
*/
|
|
41
|
+
modelName?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export declare const ConversationContextUsageUioContextWindowConfidenceEnum: {
|
|
47
|
+
readonly Declared: "declared";
|
|
48
|
+
readonly Catalog: "catalog";
|
|
49
|
+
readonly Fallback: "fallback";
|
|
50
|
+
};
|
|
51
|
+
export type ConversationContextUsageUioContextWindowConfidenceEnum = typeof ConversationContextUsageUioContextWindowConfidenceEnum[keyof typeof ConversationContextUsageUioContextWindowConfidenceEnum];
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the ConversationContextUsageUio interface.
|
|
54
|
+
*/
|
|
55
|
+
export declare function instanceOfConversationContextUsageUio(value: object): value is ConversationContextUsageUio;
|
|
56
|
+
export declare function ConversationContextUsageUioFromJSON(json: any): ConversationContextUsageUio;
|
|
57
|
+
export declare function ConversationContextUsageUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationContextUsageUio;
|
|
58
|
+
export declare function ConversationContextUsageUioToJSON(json: any): ConversationContextUsageUio;
|
|
59
|
+
export declare function ConversationContextUsageUioToJSONTyped(value?: ConversationContextUsageUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,69 @@
|
|
|
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.ConversationContextUsageUioContextWindowConfidenceEnum = void 0;
|
|
17
|
+
exports.instanceOfConversationContextUsageUio = instanceOfConversationContextUsageUio;
|
|
18
|
+
exports.ConversationContextUsageUioFromJSON = ConversationContextUsageUioFromJSON;
|
|
19
|
+
exports.ConversationContextUsageUioFromJSONTyped = ConversationContextUsageUioFromJSONTyped;
|
|
20
|
+
exports.ConversationContextUsageUioToJSON = ConversationContextUsageUioToJSON;
|
|
21
|
+
exports.ConversationContextUsageUioToJSONTyped = ConversationContextUsageUioToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.ConversationContextUsageUioContextWindowConfidenceEnum = {
|
|
26
|
+
Declared: 'declared',
|
|
27
|
+
Catalog: 'catalog',
|
|
28
|
+
Fallback: 'fallback'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the ConversationContextUsageUio interface.
|
|
32
|
+
*/
|
|
33
|
+
function instanceOfConversationContextUsageUio(value) {
|
|
34
|
+
if (!('usedTokens' in value) || value['usedTokens'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('contextWindow' in value) || value['contextWindow'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('contextWindowConfidence' in value) || value['contextWindowConfidence'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
function ConversationContextUsageUioFromJSON(json) {
|
|
43
|
+
return ConversationContextUsageUioFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function ConversationContextUsageUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
|
+
if (json == null) {
|
|
47
|
+
return json;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'usedTokens': json['usedTokens'],
|
|
51
|
+
'contextWindow': json['contextWindow'],
|
|
52
|
+
'contextWindowConfidence': json['contextWindowConfidence'],
|
|
53
|
+
'modelName': json['modelName'] == null ? undefined : json['modelName'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function ConversationContextUsageUioToJSON(json) {
|
|
57
|
+
return ConversationContextUsageUioToJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
function ConversationContextUsageUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
'usedTokens': value['usedTokens'],
|
|
65
|
+
'contextWindow': value['contextWindow'],
|
|
66
|
+
'contextWindowConfidence': value['contextWindowConfidence'],
|
|
67
|
+
'modelName': value['modelName'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { MessageStatusErrorUio } from './MessageStatusErrorUio';
|
|
13
|
+
import type { ConversationContextUsageUio } from './ConversationContextUsageUio';
|
|
13
14
|
import type { MessageStatusToolCallUio } from './MessageStatusToolCallUio';
|
|
14
15
|
import type { ToolUsedUio } from './ToolUsedUio';
|
|
15
16
|
/**
|
|
@@ -18,6 +19,12 @@ import type { ToolUsedUio } from './ToolUsedUio';
|
|
|
18
19
|
* @interface MessageStatusUio
|
|
19
20
|
*/
|
|
20
21
|
export interface MessageStatusUio {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {ConversationContextUsageUio}
|
|
25
|
+
* @memberof MessageStatusUio
|
|
26
|
+
*/
|
|
27
|
+
contextUsage?: ConversationContextUsageUio;
|
|
21
28
|
/**
|
|
22
29
|
*
|
|
23
30
|
* @type {string}
|
|
@@ -20,6 +20,7 @@ exports.MessageStatusUioFromJSONTyped = MessageStatusUioFromJSONTyped;
|
|
|
20
20
|
exports.MessageStatusUioToJSON = MessageStatusUioToJSON;
|
|
21
21
|
exports.MessageStatusUioToJSONTyped = MessageStatusUioToJSONTyped;
|
|
22
22
|
const MessageStatusErrorUio_1 = require("./MessageStatusErrorUio");
|
|
23
|
+
const ConversationContextUsageUio_1 = require("./ConversationContextUsageUio");
|
|
23
24
|
const MessageStatusToolCallUio_1 = require("./MessageStatusToolCallUio");
|
|
24
25
|
const ToolUsedUio_1 = require("./ToolUsedUio");
|
|
25
26
|
/**
|
|
@@ -45,6 +46,7 @@ function MessageStatusUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
45
46
|
return json;
|
|
46
47
|
}
|
|
47
48
|
return {
|
|
49
|
+
'contextUsage': json['contextUsage'] == null ? undefined : (0, ConversationContextUsageUio_1.ConversationContextUsageUioFromJSON)(json['contextUsage']),
|
|
48
50
|
'status': json['status'],
|
|
49
51
|
'content': json['content'] == null ? undefined : json['content'],
|
|
50
52
|
'reasoning': json['reasoning'] == null ? undefined : json['reasoning'],
|
|
@@ -62,6 +64,7 @@ function MessageStatusUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
62
64
|
return value;
|
|
63
65
|
}
|
|
64
66
|
return {
|
|
67
|
+
'contextUsage': (0, ConversationContextUsageUio_1.ConversationContextUsageUioToJSON)(value['contextUsage']),
|
|
65
68
|
'status': value['status'],
|
|
66
69
|
'content': value['content'],
|
|
67
70
|
'reasoning': value['reasoning'],
|
package/dist/models/index.d.ts
CHANGED
|
@@ -170,6 +170,7 @@ export * from './ContextUio';
|
|
|
170
170
|
export * from './ContextualKnowledgeConversationEmbeddingUio';
|
|
171
171
|
export * from './ContextualKnowledgeConversationUio';
|
|
172
172
|
export * from './ConversationAttachmentDownloadUrlUio';
|
|
173
|
+
export * from './ConversationContextUsageUio';
|
|
173
174
|
export * from './ConversationDetailUio';
|
|
174
175
|
export * from './ConversationMessageApprovalUio';
|
|
175
176
|
export * from './ConversationMessagesInnerFlowNodeEntrypointsUio';
|
package/dist/models/index.js
CHANGED
|
@@ -188,6 +188,7 @@ __exportStar(require("./ContextUio"), exports);
|
|
|
188
188
|
__exportStar(require("./ContextualKnowledgeConversationEmbeddingUio"), exports);
|
|
189
189
|
__exportStar(require("./ContextualKnowledgeConversationUio"), exports);
|
|
190
190
|
__exportStar(require("./ConversationAttachmentDownloadUrlUio"), exports);
|
|
191
|
+
__exportStar(require("./ConversationContextUsageUio"), exports);
|
|
191
192
|
__exportStar(require("./ConversationDetailUio"), exports);
|
|
192
193
|
__exportStar(require("./ConversationMessageApprovalUio"), exports);
|
|
193
194
|
__exportStar(require("./ConversationMessagesInnerFlowNodeEntrypointsUio"), exports);
|
package/dist/openapi.json
CHANGED
|
@@ -17254,6 +17254,9 @@
|
|
|
17254
17254
|
"usage" : {
|
|
17255
17255
|
"$ref" : "#/components/schemas/TokenUsage"
|
|
17256
17256
|
},
|
|
17257
|
+
"contextUsage" : {
|
|
17258
|
+
"$ref" : "#/components/schemas/ConversationContextUsage"
|
|
17259
|
+
},
|
|
17257
17260
|
"createdAt" : {
|
|
17258
17261
|
"type" : "string"
|
|
17259
17262
|
},
|
|
@@ -17540,6 +17543,34 @@
|
|
|
17540
17543
|
"required" : [ "inputTokens", "outputTokens", "reasoningTokens", "totalTokens" ],
|
|
17541
17544
|
"type" : "object"
|
|
17542
17545
|
},
|
|
17546
|
+
"ConversationContextUsage" : {
|
|
17547
|
+
"additionalProperties" : false,
|
|
17548
|
+
"description" : "How much of the model's context window this conversation occupies: the prompt of the last generation call, not the conversation's cumulated token count. Absent until a turn has been measured — an unmeasured conversation has an unknown occupancy, not an empty window.",
|
|
17549
|
+
"properties" : {
|
|
17550
|
+
"usedTokens" : {
|
|
17551
|
+
"description" : "Prompt of the last generation call, in tokens, as reported by the provider. Always > 0.",
|
|
17552
|
+
"example" : 18342,
|
|
17553
|
+
"type" : "number"
|
|
17554
|
+
},
|
|
17555
|
+
"contextWindow" : {
|
|
17556
|
+
"description" : "Context window of the conversation's model, in tokens. Always greater than 0.",
|
|
17557
|
+
"example" : 128000,
|
|
17558
|
+
"type" : "number"
|
|
17559
|
+
},
|
|
17560
|
+
"contextWindowConfidence" : {
|
|
17561
|
+
"description" : "Where the window above comes from. `declared`: carried by the model definition. `catalog`: known to the backend only. `fallback`: unknown, shown as an approximation.",
|
|
17562
|
+
"enum" : [ "declared", "catalog", "fallback" ],
|
|
17563
|
+
"type" : "string"
|
|
17564
|
+
},
|
|
17565
|
+
"modelName" : {
|
|
17566
|
+
"description" : "Model the conversation runs on, absent when its engine reference resolves to none.",
|
|
17567
|
+
"type" : "string"
|
|
17568
|
+
}
|
|
17569
|
+
},
|
|
17570
|
+
"required" : [ "contextWindow", "contextWindowConfidence", "usedTokens" ],
|
|
17571
|
+
"title" : "ConversationContextUsage",
|
|
17572
|
+
"type" : "object"
|
|
17573
|
+
},
|
|
17543
17574
|
"ChatContext" : {
|
|
17544
17575
|
"properties" : {
|
|
17545
17576
|
"attachments" : {
|
|
@@ -22037,6 +22068,9 @@
|
|
|
22037
22068
|
},
|
|
22038
22069
|
"MessageStatus" : {
|
|
22039
22070
|
"properties" : {
|
|
22071
|
+
"contextUsage" : {
|
|
22072
|
+
"$ref" : "#/components/schemas/ConversationContextUsage"
|
|
22073
|
+
},
|
|
22040
22074
|
"status" : {
|
|
22041
22075
|
"type" : "string"
|
|
22042
22076
|
},
|