@breign/client 1.0.149 → 1.0.151

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.
@@ -21,6 +21,12 @@ export interface AnonymizeResponseUio {
21
21
  * @memberof AnonymizeResponseUio
22
22
  */
23
23
  anonymizedPrompt?: string;
24
+ /**
25
+ *
26
+ * @type {Array<string>}
27
+ * @memberof AnonymizeResponseUio
28
+ */
29
+ blockedEntityTypes?: Array<string>;
24
30
  }
25
31
  /**
26
32
  * Check if a given object implements the AnonymizeResponseUio interface.
@@ -33,6 +33,7 @@ function AnonymizeResponseUioFromJSONTyped(json, ignoreDiscriminator) {
33
33
  }
34
34
  return {
35
35
  'anonymizedPrompt': json['anonymizedPrompt'] == null ? undefined : json['anonymizedPrompt'],
36
+ 'blockedEntityTypes': json['blockedEntityTypes'] == null ? undefined : json['blockedEntityTypes'],
36
37
  };
37
38
  }
38
39
  function AnonymizeResponseUioToJSON(json) {
@@ -44,5 +45,6 @@ function AnonymizeResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
44
45
  }
45
46
  return {
46
47
  'anonymizedPrompt': value['anonymizedPrompt'],
48
+ 'blockedEntityTypes': value['blockedEntityTypes'],
47
49
  };
48
50
  }
@@ -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}
@@ -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
+ }
@@ -0,0 +1,26 @@
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
+ */
16
+ export declare const EntityModeUio: {
17
+ readonly Blocked: "BLOCKED";
18
+ readonly Ignored: "IGNORED";
19
+ readonly Anonymized: "ANONYMIZED";
20
+ };
21
+ export type EntityModeUio = typeof EntityModeUio[keyof typeof EntityModeUio];
22
+ export declare function instanceOfEntityModeUio(value: any): boolean;
23
+ export declare function EntityModeUioFromJSON(json: any): EntityModeUio;
24
+ export declare function EntityModeUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): EntityModeUio;
25
+ export declare function EntityModeUioToJSON(value?: EntityModeUio | null): any;
26
+ export declare function EntityModeUioToJSONTyped(value: any, ignoreDiscriminator: boolean): EntityModeUio;
@@ -0,0 +1,52 @@
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.EntityModeUio = void 0;
17
+ exports.instanceOfEntityModeUio = instanceOfEntityModeUio;
18
+ exports.EntityModeUioFromJSON = EntityModeUioFromJSON;
19
+ exports.EntityModeUioFromJSONTyped = EntityModeUioFromJSONTyped;
20
+ exports.EntityModeUioToJSON = EntityModeUioToJSON;
21
+ exports.EntityModeUioToJSONTyped = EntityModeUioToJSONTyped;
22
+ /**
23
+ *
24
+ * @export
25
+ */
26
+ exports.EntityModeUio = {
27
+ Blocked: 'BLOCKED',
28
+ Ignored: 'IGNORED',
29
+ Anonymized: 'ANONYMIZED'
30
+ };
31
+ function instanceOfEntityModeUio(value) {
32
+ for (const key in exports.EntityModeUio) {
33
+ if (Object.prototype.hasOwnProperty.call(exports.EntityModeUio, key)) {
34
+ if (exports.EntityModeUio[key] === value) {
35
+ return true;
36
+ }
37
+ }
38
+ }
39
+ return false;
40
+ }
41
+ function EntityModeUioFromJSON(json) {
42
+ return EntityModeUioFromJSONTyped(json, false);
43
+ }
44
+ function EntityModeUioFromJSONTyped(json, ignoreDiscriminator) {
45
+ return json;
46
+ }
47
+ function EntityModeUioToJSON(value) {
48
+ return value;
49
+ }
50
+ function EntityModeUioToJSONTyped(value, ignoreDiscriminator) {
51
+ return value;
52
+ }
@@ -0,0 +1,75 @@
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
+ import type { EntityModeUio } from './EntityModeUio';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface EntityTypeRuleUio
17
+ */
18
+ export interface EntityTypeRuleUio {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof EntityTypeRuleUio
23
+ */
24
+ id: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof EntityTypeRuleUio
29
+ */
30
+ entityType: string;
31
+ /**
32
+ *
33
+ * @type {boolean}
34
+ * @memberof EntityTypeRuleUio
35
+ */
36
+ isDefault: boolean;
37
+ /**
38
+ *
39
+ * @type {EntityModeUio}
40
+ * @memberof EntityTypeRuleUio
41
+ */
42
+ mode: EntityModeUio;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof EntityTypeRuleUio
47
+ */
48
+ label?: string;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof EntityTypeRuleUio
53
+ */
54
+ expression?: string;
55
+ /**
56
+ *
57
+ * @type {number}
58
+ * @memberof EntityTypeRuleUio
59
+ */
60
+ score?: number;
61
+ /**
62
+ *
63
+ * @type {Array<string>}
64
+ * @memberof EntityTypeRuleUio
65
+ */
66
+ context?: Array<string>;
67
+ }
68
+ /**
69
+ * Check if a given object implements the EntityTypeRuleUio interface.
70
+ */
71
+ export declare function instanceOfEntityTypeRuleUio(value: object): value is EntityTypeRuleUio;
72
+ export declare function EntityTypeRuleUioFromJSON(json: any): EntityTypeRuleUio;
73
+ export declare function EntityTypeRuleUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): EntityTypeRuleUio;
74
+ export declare function EntityTypeRuleUioToJSON(json: any): EntityTypeRuleUio;
75
+ export declare function EntityTypeRuleUioToJSONTyped(value?: EntityTypeRuleUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,71 @@
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.instanceOfEntityTypeRuleUio = instanceOfEntityTypeRuleUio;
17
+ exports.EntityTypeRuleUioFromJSON = EntityTypeRuleUioFromJSON;
18
+ exports.EntityTypeRuleUioFromJSONTyped = EntityTypeRuleUioFromJSONTyped;
19
+ exports.EntityTypeRuleUioToJSON = EntityTypeRuleUioToJSON;
20
+ exports.EntityTypeRuleUioToJSONTyped = EntityTypeRuleUioToJSONTyped;
21
+ const EntityModeUio_1 = require("./EntityModeUio");
22
+ /**
23
+ * Check if a given object implements the EntityTypeRuleUio interface.
24
+ */
25
+ function instanceOfEntityTypeRuleUio(value) {
26
+ if (!('id' in value) || value['id'] === undefined)
27
+ return false;
28
+ if (!('entityType' in value) || value['entityType'] === undefined)
29
+ return false;
30
+ if (!('isDefault' in value) || value['isDefault'] === undefined)
31
+ return false;
32
+ if (!('mode' in value) || value['mode'] === undefined)
33
+ return false;
34
+ return true;
35
+ }
36
+ function EntityTypeRuleUioFromJSON(json) {
37
+ return EntityTypeRuleUioFromJSONTyped(json, false);
38
+ }
39
+ function EntityTypeRuleUioFromJSONTyped(json, ignoreDiscriminator) {
40
+ if (json == null) {
41
+ return json;
42
+ }
43
+ return {
44
+ 'id': json['id'],
45
+ 'entityType': json['entityType'],
46
+ 'isDefault': json['isDefault'],
47
+ 'mode': (0, EntityModeUio_1.EntityModeUioFromJSON)(json['mode']),
48
+ 'label': json['label'] == null ? undefined : json['label'],
49
+ 'expression': json['expression'] == null ? undefined : json['expression'],
50
+ 'score': json['score'] == null ? undefined : json['score'],
51
+ 'context': json['context'] == null ? undefined : json['context'],
52
+ };
53
+ }
54
+ function EntityTypeRuleUioToJSON(json) {
55
+ return EntityTypeRuleUioToJSONTyped(json, false);
56
+ }
57
+ function EntityTypeRuleUioToJSONTyped(value, ignoreDiscriminator = false) {
58
+ if (value == null) {
59
+ return value;
60
+ }
61
+ return {
62
+ 'id': value['id'],
63
+ 'entityType': value['entityType'],
64
+ 'isDefault': value['isDefault'],
65
+ 'mode': (0, EntityModeUio_1.EntityModeUioToJSON)(value['mode']),
66
+ 'label': value['label'],
67
+ 'expression': value['expression'],
68
+ 'score': value['score'],
69
+ 'context': value['context'],
70
+ };
71
+ }
@@ -11,8 +11,8 @@
11
11
  */
12
12
  import type { GuardianRoleUio } from './GuardianRoleUio';
13
13
  import type { GuardianEngineUio } from './GuardianEngineUio';
14
- import type { RegexPatternUio } from './RegexPatternUio';
15
14
  import type { GuardianTypeUio } from './GuardianTypeUio';
15
+ import type { EntityTypeRuleUio } from './EntityTypeRuleUio';
16
16
  import type { GuardianPositionUio } from './GuardianPositionUio';
17
17
  /**
18
18
  *
@@ -78,10 +78,10 @@ export interface GuardianPutRequestUio {
78
78
  excludedAgents?: Array<any>;
79
79
  /**
80
80
  *
81
- * @type {Array<RegexPatternUio>}
81
+ * @type {Array<EntityTypeRuleUio>}
82
82
  * @memberof GuardianPutRequestUio
83
83
  */
84
- regexPatterns?: Array<RegexPatternUio>;
84
+ entityTypeRules?: Array<EntityTypeRuleUio>;
85
85
  /**
86
86
  *
87
87
  * @type {boolean}
@@ -20,8 +20,8 @@ exports.GuardianPutRequestUioToJSON = GuardianPutRequestUioToJSON;
20
20
  exports.GuardianPutRequestUioToJSONTyped = GuardianPutRequestUioToJSONTyped;
21
21
  const GuardianRoleUio_1 = require("./GuardianRoleUio");
22
22
  const GuardianEngineUio_1 = require("./GuardianEngineUio");
23
- const RegexPatternUio_1 = require("./RegexPatternUio");
24
23
  const GuardianTypeUio_1 = require("./GuardianTypeUio");
24
+ const EntityTypeRuleUio_1 = require("./EntityTypeRuleUio");
25
25
  const GuardianPositionUio_1 = require("./GuardianPositionUio");
26
26
  /**
27
27
  * Check if a given object implements the GuardianPutRequestUio interface.
@@ -46,7 +46,7 @@ function GuardianPutRequestUioFromJSONTyped(json, ignoreDiscriminator) {
46
46
  'position': json['position'] == null ? undefined : (json['position'].map(GuardianPositionUio_1.GuardianPositionUioFromJSON)),
47
47
  'engine': json['engine'] == null ? undefined : (0, GuardianEngineUio_1.GuardianEngineUioFromJSON)(json['engine']),
48
48
  'excludedAgents': json['excludedAgents'] == null ? undefined : json['excludedAgents'],
49
- 'regexPatterns': json['regexPatterns'] == null ? undefined : (json['regexPatterns'].map(RegexPatternUio_1.RegexPatternUioFromJSON)),
49
+ 'entityTypeRules': json['entityTypeRules'] == null ? undefined : (json['entityTypeRules'].map(EntityTypeRuleUio_1.EntityTypeRuleUioFromJSON)),
50
50
  'useFaker': json['useFaker'] == null ? undefined : json['useFaker'],
51
51
  };
52
52
  }
@@ -67,7 +67,7 @@ function GuardianPutRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
67
67
  'position': value['position'] == null ? undefined : (value['position'].map(GuardianPositionUio_1.GuardianPositionUioToJSON)),
68
68
  'engine': (0, GuardianEngineUio_1.GuardianEngineUioToJSON)(value['engine']),
69
69
  'excludedAgents': value['excludedAgents'],
70
- 'regexPatterns': value['regexPatterns'] == null ? undefined : (value['regexPatterns'].map(RegexPatternUio_1.RegexPatternUioToJSON)),
70
+ 'entityTypeRules': value['entityTypeRules'] == null ? undefined : (value['entityTypeRules'].map(EntityTypeRuleUio_1.EntityTypeRuleUioToJSON)),
71
71
  'useFaker': value['useFaker'],
72
72
  };
73
73
  }
@@ -11,8 +11,8 @@
11
11
  */
12
12
  import type { GuardianRoleUio } from './GuardianRoleUio';
13
13
  import type { GuardianEngineUio } from './GuardianEngineUio';
14
- import type { RegexPatternUio } from './RegexPatternUio';
15
14
  import type { GuardianTypeUio } from './GuardianTypeUio';
15
+ import type { EntityTypeRuleUio } from './EntityTypeRuleUio';
16
16
  import type { GuardianPositionUio } from './GuardianPositionUio';
17
17
  /**
18
18
  *
@@ -120,10 +120,10 @@ export interface GuardianUio {
120
120
  useFaker?: boolean;
121
121
  /**
122
122
  *
123
- * @type {Array<RegexPatternUio>}
123
+ * @type {Array<EntityTypeRuleUio>}
124
124
  * @memberof GuardianUio
125
125
  */
126
- regexPatterns?: Array<RegexPatternUio>;
126
+ entityTypeRules?: Array<EntityTypeRuleUio>;
127
127
  }
128
128
  /**
129
129
  * Check if a given object implements the GuardianUio interface.
@@ -20,8 +20,8 @@ exports.GuardianUioToJSON = GuardianUioToJSON;
20
20
  exports.GuardianUioToJSONTyped = GuardianUioToJSONTyped;
21
21
  const GuardianRoleUio_1 = require("./GuardianRoleUio");
22
22
  const GuardianEngineUio_1 = require("./GuardianEngineUio");
23
- const RegexPatternUio_1 = require("./RegexPatternUio");
24
23
  const GuardianTypeUio_1 = require("./GuardianTypeUio");
24
+ const EntityTypeRuleUio_1 = require("./EntityTypeRuleUio");
25
25
  const GuardianPositionUio_1 = require("./GuardianPositionUio");
26
26
  /**
27
27
  * Check if a given object implements the GuardianUio interface.
@@ -65,7 +65,7 @@ function GuardianUioFromJSONTyped(json, ignoreDiscriminator) {
65
65
  'thresholds': json['thresholds'] == null ? undefined : json['thresholds'],
66
66
  'excludedAgents': json['excludedAgents'] == null ? undefined : json['excludedAgents'],
67
67
  'useFaker': json['useFaker'] == null ? undefined : json['useFaker'],
68
- 'regexPatterns': json['regexPatterns'] == null ? undefined : (json['regexPatterns'].map(RegexPatternUio_1.RegexPatternUioFromJSON)),
68
+ 'entityTypeRules': json['entityTypeRules'] == null ? undefined : (json['entityTypeRules'].map(EntityTypeRuleUio_1.EntityTypeRuleUioFromJSON)),
69
69
  };
70
70
  }
71
71
  function GuardianUioToJSON(json) {
@@ -92,6 +92,6 @@ function GuardianUioToJSONTyped(value, ignoreDiscriminator = false) {
92
92
  'thresholds': value['thresholds'],
93
93
  'excludedAgents': value['excludedAgents'],
94
94
  'useFaker': value['useFaker'],
95
- 'regexPatterns': value['regexPatterns'] == null ? undefined : (value['regexPatterns'].map(RegexPatternUio_1.RegexPatternUioToJSON)),
95
+ 'entityTypeRules': value['entityTypeRules'] == null ? undefined : (value['entityTypeRules'].map(EntityTypeRuleUio_1.EntityTypeRuleUioToJSON)),
96
96
  };
97
97
  }
@@ -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'],
@@ -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';
@@ -204,6 +205,8 @@ export * from './EmbeddingProviderModelsInnerUio';
204
205
  export * from './EmbeddingProviderUio';
205
206
  export * from './EngineOptionsUio';
206
207
  export * from './EngineUio';
208
+ export * from './EntityModeUio';
209
+ export * from './EntityTypeRuleUio';
207
210
  export * from './EphemeralInstanceUio';
208
211
  export * from './EphemeralInstancesMetricsResponseUio';
209
212
  export * from './EphemeralInstancesTimeSeriesPointUio';
@@ -351,7 +354,6 @@ export * from './ProviderCreateRequestUio';
351
354
  export * from './ProviderTypeUio';
352
355
  export * from './ProviderUio';
353
356
  export * from './ProviderValiationRequestUio';
354
- export * from './RegexPatternUio';
355
357
  export * from './RevealTokenRequestUio';
356
358
  export * from './RevealTokenResponseUio';
357
359
  export * from './RoleCreateRequestUio';
@@ -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);
@@ -222,6 +223,8 @@ __exportStar(require("./EmbeddingProviderModelsInnerUio"), exports);
222
223
  __exportStar(require("./EmbeddingProviderUio"), exports);
223
224
  __exportStar(require("./EngineOptionsUio"), exports);
224
225
  __exportStar(require("./EngineUio"), exports);
226
+ __exportStar(require("./EntityModeUio"), exports);
227
+ __exportStar(require("./EntityTypeRuleUio"), exports);
225
228
  __exportStar(require("./EphemeralInstanceUio"), exports);
226
229
  __exportStar(require("./EphemeralInstancesMetricsResponseUio"), exports);
227
230
  __exportStar(require("./EphemeralInstancesTimeSeriesPointUio"), exports);
@@ -369,7 +372,6 @@ __exportStar(require("./ProviderCreateRequestUio"), exports);
369
372
  __exportStar(require("./ProviderTypeUio"), exports);
370
373
  __exportStar(require("./ProviderUio"), exports);
371
374
  __exportStar(require("./ProviderValiationRequestUio"), exports);
372
- __exportStar(require("./RegexPatternUio"), exports);
373
375
  __exportStar(require("./RevealTokenRequestUio"), exports);
374
376
  __exportStar(require("./RevealTokenResponseUio"), exports);
375
377
  __exportStar(require("./RoleCreateRequestUio"), 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" : {
@@ -19891,9 +19922,9 @@
19891
19922
  "useFaker" : {
19892
19923
  "type" : "boolean"
19893
19924
  },
19894
- "regexPatterns" : {
19925
+ "entityTypeRules" : {
19895
19926
  "items" : {
19896
- "$ref" : "#/components/schemas/RegexPattern"
19927
+ "$ref" : "#/components/schemas/EntityTypeRule"
19897
19928
  },
19898
19929
  "type" : "array"
19899
19930
  }
@@ -19901,25 +19932,37 @@
19901
19932
  "required" : [ "createdAt", "engine", "id", "organisationId", "role", "type" ],
19902
19933
  "type" : "object"
19903
19934
  },
19904
- "RegexPattern" : {
19935
+ "EntityTypeRule" : {
19905
19936
  "properties" : {
19906
19937
  "id" : {
19907
19938
  "type" : "string"
19908
19939
  },
19909
- "name" : {
19940
+ "entityType" : {
19910
19941
  "type" : "string"
19911
19942
  },
19912
- "expression" : {
19943
+ "isDefault" : {
19944
+ "type" : "boolean"
19945
+ },
19946
+ "mode" : {
19947
+ "$ref" : "#/components/schemas/EntityMode"
19948
+ },
19949
+ "label" : {
19913
19950
  "type" : "string"
19914
19951
  },
19915
- "entityType" : {
19952
+ "expression" : {
19916
19953
  "type" : "string"
19917
19954
  },
19918
- "enabled" : {
19919
- "type" : "boolean"
19955
+ "score" : {
19956
+ "type" : "number"
19957
+ },
19958
+ "context" : {
19959
+ "items" : {
19960
+ "type" : "string"
19961
+ },
19962
+ "type" : "array"
19920
19963
  }
19921
19964
  },
19922
- "required" : [ "enabled", "entityType", "expression", "id", "name" ],
19965
+ "required" : [ "entityType", "id", "isDefault", "mode" ],
19923
19966
  "type" : "object"
19924
19967
  },
19925
19968
  "GuardianCreateRequest" : {
@@ -19994,9 +20037,9 @@
19994
20037
  "items" : { },
19995
20038
  "type" : "array"
19996
20039
  },
19997
- "regexPatterns" : {
20040
+ "entityTypeRules" : {
19998
20041
  "items" : {
19999
- "$ref" : "#/components/schemas/RegexPattern"
20042
+ "$ref" : "#/components/schemas/EntityTypeRule"
20000
20043
  },
20001
20044
  "type" : "array"
20002
20045
  },
@@ -20019,6 +20062,12 @@
20019
20062
  "properties" : {
20020
20063
  "anonymizedPrompt" : {
20021
20064
  "type" : "string"
20065
+ },
20066
+ "blockedEntityTypes" : {
20067
+ "items" : {
20068
+ "type" : "string"
20069
+ },
20070
+ "type" : "array"
20022
20071
  }
20023
20072
  },
20024
20073
  "type" : "object"
@@ -22037,6 +22086,9 @@
22037
22086
  },
22038
22087
  "MessageStatus" : {
22039
22088
  "properties" : {
22089
+ "contextUsage" : {
22090
+ "$ref" : "#/components/schemas/ConversationContextUsage"
22091
+ },
22040
22092
  "status" : {
22041
22093
  "type" : "string"
22042
22094
  },
@@ -23517,6 +23569,10 @@
23517
23569
  "enum" : [ "entry", "exit" ],
23518
23570
  "type" : "string"
23519
23571
  },
23572
+ "EntityMode" : {
23573
+ "enum" : [ "BLOCKED", "IGNORED", "ANONYMIZED" ],
23574
+ "type" : "string"
23575
+ },
23520
23576
  "EngineOptions" : {
23521
23577
  "additionalProperties" : false,
23522
23578
  "description" : "Advanced engine options for an organization.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.149",
3
+ "version": "1.0.151",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -1,56 +0,0 @@
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 RegexPatternUio
16
- */
17
- export interface RegexPatternUio {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof RegexPatternUio
22
- */
23
- id: string;
24
- /**
25
- *
26
- * @type {string}
27
- * @memberof RegexPatternUio
28
- */
29
- name: string;
30
- /**
31
- *
32
- * @type {string}
33
- * @memberof RegexPatternUio
34
- */
35
- expression: string;
36
- /**
37
- *
38
- * @type {string}
39
- * @memberof RegexPatternUio
40
- */
41
- entityType: string;
42
- /**
43
- *
44
- * @type {boolean}
45
- * @memberof RegexPatternUio
46
- */
47
- enabled: boolean;
48
- }
49
- /**
50
- * Check if a given object implements the RegexPatternUio interface.
51
- */
52
- export declare function instanceOfRegexPatternUio(value: object): value is RegexPatternUio;
53
- export declare function RegexPatternUioFromJSON(json: any): RegexPatternUio;
54
- export declare function RegexPatternUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegexPatternUio;
55
- export declare function RegexPatternUioToJSON(json: any): RegexPatternUio;
56
- export declare function RegexPatternUioToJSONTyped(value?: RegexPatternUio | null, ignoreDiscriminator?: boolean): any;
@@ -1,66 +0,0 @@
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.instanceOfRegexPatternUio = instanceOfRegexPatternUio;
17
- exports.RegexPatternUioFromJSON = RegexPatternUioFromJSON;
18
- exports.RegexPatternUioFromJSONTyped = RegexPatternUioFromJSONTyped;
19
- exports.RegexPatternUioToJSON = RegexPatternUioToJSON;
20
- exports.RegexPatternUioToJSONTyped = RegexPatternUioToJSONTyped;
21
- /**
22
- * Check if a given object implements the RegexPatternUio interface.
23
- */
24
- function instanceOfRegexPatternUio(value) {
25
- if (!('id' in value) || value['id'] === undefined)
26
- return false;
27
- if (!('name' in value) || value['name'] === undefined)
28
- return false;
29
- if (!('expression' in value) || value['expression'] === undefined)
30
- return false;
31
- if (!('entityType' in value) || value['entityType'] === undefined)
32
- return false;
33
- if (!('enabled' in value) || value['enabled'] === undefined)
34
- return false;
35
- return true;
36
- }
37
- function RegexPatternUioFromJSON(json) {
38
- return RegexPatternUioFromJSONTyped(json, false);
39
- }
40
- function RegexPatternUioFromJSONTyped(json, ignoreDiscriminator) {
41
- if (json == null) {
42
- return json;
43
- }
44
- return {
45
- 'id': json['id'],
46
- 'name': json['name'],
47
- 'expression': json['expression'],
48
- 'entityType': json['entityType'],
49
- 'enabled': json['enabled'],
50
- };
51
- }
52
- function RegexPatternUioToJSON(json) {
53
- return RegexPatternUioToJSONTyped(json, false);
54
- }
55
- function RegexPatternUioToJSONTyped(value, ignoreDiscriminator = false) {
56
- if (value == null) {
57
- return value;
58
- }
59
- return {
60
- 'id': value['id'],
61
- 'name': value['name'],
62
- 'expression': value['expression'],
63
- 'entityType': value['entityType'],
64
- 'enabled': value['enabled'],
65
- };
66
- }