@breign/client 1.0.134 → 1.0.135

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.
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AgentChatOverviewEntryUio, AttachmentCreateRequestUio, AttachmentCreateResponseUio, AttachmentDetailsResponseUio, AttachmentProcessedRequestUio, BodyWithMessageUio, ContextLocationRequestUio, ContextUio, ConversationSummaryUio, CreateCustomVariable200ResponseUio, MarkConversationReadRequestUio, MessageAnonymizationUio, SetUserAgentConversationRequestUio, UpdateConversationTitleRequestUio, UpdateUserChatPreferencesRequestUio, UserChatPreferencesUio, WorkspaceFileContentUio, WorkspaceFileEntryUio } from '../models/index';
13
+ import type { AgentChatOverviewEntryUio, AttachmentCreateRequestUio, AttachmentCreateResponseUio, AttachmentDetailsResponseUio, AttachmentProcessedRequestUio, BodyWithMessageUio, ContextLocationRequestUio, ContextUio, ConversationSummaryUio, CreateCustomVariable200ResponseUio, MarkConversationReadRequestUio, MessageAnonymizationUio, SetUserAgentConversationRequestUio, ToolCallResultRequestUio, ToolCallResultResponseUio, ToolCallsResponseUio, UpdateConversationTitleRequestUio, UpdateUserChatPreferencesRequestUio, UserChatPreferencesUio, WorkspaceFileContentUio, WorkspaceFileEntryUio } from '../models/index';
14
14
  export interface ArchiveConversationByIdRequest {
15
15
  conversationId: string;
16
16
  }
@@ -73,6 +73,11 @@ export interface GetUserChatPreferencesRequest {
73
73
  export interface ListConversationWorkspaceFilesRequest {
74
74
  conversationId: string;
75
75
  }
76
+ export interface ListMessageToolCallsRequest {
77
+ conversationId: string;
78
+ messageId: string;
79
+ pending?: boolean;
80
+ }
76
81
  export interface MarkAttachmentProcessedRequest {
77
82
  conversationId: string;
78
83
  attachmentId: string;
@@ -91,6 +96,12 @@ export interface SetUserAgentConversationRequest {
91
96
  agentId: string;
92
97
  setUserAgentConversationRequestUio: SetUserAgentConversationRequestUio;
93
98
  }
99
+ export interface SubmitMessageToolCallResultRequest {
100
+ conversationId: string;
101
+ messageId: string;
102
+ callId: string;
103
+ toolCallResultRequestUio: ToolCallResultRequestUio;
104
+ }
94
105
  export interface UpdateAttachmentStatusRequest {
95
106
  conversationId: string;
96
107
  attachmentId: string;
@@ -277,6 +288,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
277
288
  * List the files of a conversation workspace
278
289
  */
279
290
  listConversationWorkspaceFiles(conversationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<WorkspaceFileEntryUio>>;
291
+ /**
292
+ * Returns the tool calls issued by one assistant message, newest first. Use pending=true while waiting: it keeps only the calls that still need a result. Without the filter, calls already answered are returned too, so a client can replay what it sent.
293
+ * List the tool calls of a message
294
+ */
295
+ listMessageToolCallsRaw(requestParameters: ListMessageToolCallsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ToolCallsResponseUio>>;
296
+ /**
297
+ * Returns the tool calls issued by one assistant message, newest first. Use pending=true while waiting: it keeps only the calls that still need a result. Without the filter, calls already answered are returned too, so a client can replay what it sent.
298
+ * List the tool calls of a message
299
+ */
300
+ listMessageToolCalls(conversationId: string, messageId: string, pending?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ToolCallsResponseUio>;
280
301
  /**
281
302
  * Internal callback endpoint called when attachment processing is complete. Réservé au service de documents : tout autre appelant reçoit un 403. L\'attachment doit être en état `PROCESSING`.
282
303
  * Mark a conversation attachment as processed
@@ -317,6 +338,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
317
338
  * Set the conversation in progress with an agent
318
339
  */
319
340
  setUserAgentConversation(organizationId: string, agentId: string, setUserAgentConversationRequestUio: SetUserAgentConversationRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
341
+ /**
342
+ * Submits the result of one tool call, which releases the suspended conversation turn. Works for any tool: output becomes the tool result handed to the model, and attachments are stored, added to the conversation context and to the last user message. A call can only be answered once — answering an already resolved or expired call returns 409. A message may carry several calls, each answered independently and in any order.
343
+ * Post the result of a tool call
344
+ */
345
+ submitMessageToolCallResultRaw(requestParameters: SubmitMessageToolCallResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ToolCallResultResponseUio>>;
346
+ /**
347
+ * Submits the result of one tool call, which releases the suspended conversation turn. Works for any tool: output becomes the tool result handed to the model, and attachments are stored, added to the conversation context and to the last user message. A call can only be answered once — answering an already resolved or expired call returns 409. A message may carry several calls, each answered independently and in any order.
348
+ * Post the result of a tool call
349
+ */
350
+ submitMessageToolCallResult(conversationId: string, messageId: string, callId: string, toolCallResultRequestUio: ToolCallResultRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ToolCallResultResponseUio>;
320
351
  /**
321
352
  * Change the status of an attachment to \'PROCESSING\' after it has been uploaded.
322
353
  * Update the status of an uploaded attachment
@@ -561,6 +561,41 @@ class ConversationsApi extends runtime.BaseAPI {
561
561
  const response = await this.listConversationWorkspaceFilesRaw({ conversationId: conversationId }, initOverrides);
562
562
  return await response.value();
563
563
  }
564
+ /**
565
+ * Returns the tool calls issued by one assistant message, newest first. Use pending=true while waiting: it keeps only the calls that still need a result. Without the filter, calls already answered are returned too, so a client can replay what it sent.
566
+ * List the tool calls of a message
567
+ */
568
+ async listMessageToolCallsRaw(requestParameters, initOverrides) {
569
+ if (requestParameters['conversationId'] == null) {
570
+ throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling listMessageToolCalls().');
571
+ }
572
+ if (requestParameters['messageId'] == null) {
573
+ throw new runtime.RequiredError('messageId', 'Required parameter "messageId" was null or undefined when calling listMessageToolCalls().');
574
+ }
575
+ const queryParameters = {};
576
+ if (requestParameters['pending'] != null) {
577
+ queryParameters['pending'] = requestParameters['pending'];
578
+ }
579
+ const headerParameters = {};
580
+ if (this.configuration && this.configuration.apiKey) {
581
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
582
+ }
583
+ const response = await this.request({
584
+ path: `/conversations/{conversationId}/messages/{messageId}/tool-calls`.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))).replace(`{${"messageId"}}`, encodeURIComponent(String(requestParameters['messageId']))),
585
+ method: 'GET',
586
+ headers: headerParameters,
587
+ query: queryParameters,
588
+ }, initOverrides);
589
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ToolCallsResponseUioFromJSON)(jsonValue));
590
+ }
591
+ /**
592
+ * Returns the tool calls issued by one assistant message, newest first. Use pending=true while waiting: it keeps only the calls that still need a result. Without the filter, calls already answered are returned too, so a client can replay what it sent.
593
+ * List the tool calls of a message
594
+ */
595
+ async listMessageToolCalls(conversationId, messageId, pending, initOverrides) {
596
+ const response = await this.listMessageToolCallsRaw({ conversationId: conversationId, messageId: messageId, pending: pending }, initOverrides);
597
+ return await response.value();
598
+ }
564
599
  /**
565
600
  * Internal callback endpoint called when attachment processing is complete. Réservé au service de documents : tout autre appelant reçoit un 403. L\'attachment doit être en état `PROCESSING`.
566
601
  * Mark a conversation attachment as processed
@@ -698,6 +733,46 @@ class ConversationsApi extends runtime.BaseAPI {
698
733
  async setUserAgentConversation(organizationId, agentId, setUserAgentConversationRequestUio, initOverrides) {
699
734
  await this.setUserAgentConversationRaw({ organizationId: organizationId, agentId: agentId, setUserAgentConversationRequestUio: setUserAgentConversationRequestUio }, initOverrides);
700
735
  }
736
+ /**
737
+ * Submits the result of one tool call, which releases the suspended conversation turn. Works for any tool: output becomes the tool result handed to the model, and attachments are stored, added to the conversation context and to the last user message. A call can only be answered once — answering an already resolved or expired call returns 409. A message may carry several calls, each answered independently and in any order.
738
+ * Post the result of a tool call
739
+ */
740
+ async submitMessageToolCallResultRaw(requestParameters, initOverrides) {
741
+ if (requestParameters['conversationId'] == null) {
742
+ throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling submitMessageToolCallResult().');
743
+ }
744
+ if (requestParameters['messageId'] == null) {
745
+ throw new runtime.RequiredError('messageId', 'Required parameter "messageId" was null or undefined when calling submitMessageToolCallResult().');
746
+ }
747
+ if (requestParameters['callId'] == null) {
748
+ throw new runtime.RequiredError('callId', 'Required parameter "callId" was null or undefined when calling submitMessageToolCallResult().');
749
+ }
750
+ if (requestParameters['toolCallResultRequestUio'] == null) {
751
+ throw new runtime.RequiredError('toolCallResultRequestUio', 'Required parameter "toolCallResultRequestUio" was null or undefined when calling submitMessageToolCallResult().');
752
+ }
753
+ const queryParameters = {};
754
+ const headerParameters = {};
755
+ headerParameters['Content-Type'] = 'application/json';
756
+ if (this.configuration && this.configuration.apiKey) {
757
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
758
+ }
759
+ const response = await this.request({
760
+ path: `/conversations/{conversationId}/messages/{messageId}/tool-calls/{callId}`.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))).replace(`{${"messageId"}}`, encodeURIComponent(String(requestParameters['messageId']))).replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId']))),
761
+ method: 'POST',
762
+ headers: headerParameters,
763
+ query: queryParameters,
764
+ body: (0, index_1.ToolCallResultRequestUioToJSON)(requestParameters['toolCallResultRequestUio']),
765
+ }, initOverrides);
766
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ToolCallResultResponseUioFromJSON)(jsonValue));
767
+ }
768
+ /**
769
+ * Submits the result of one tool call, which releases the suspended conversation turn. Works for any tool: output becomes the tool result handed to the model, and attachments are stored, added to the conversation context and to the last user message. A call can only be answered once — answering an already resolved or expired call returns 409. A message may carry several calls, each answered independently and in any order.
770
+ * Post the result of a tool call
771
+ */
772
+ async submitMessageToolCallResult(conversationId, messageId, callId, toolCallResultRequestUio, initOverrides) {
773
+ const response = await this.submitMessageToolCallResultRaw({ conversationId: conversationId, messageId: messageId, callId: callId, toolCallResultRequestUio: toolCallResultRequestUio }, initOverrides);
774
+ return await response.value();
775
+ }
701
776
  /**
702
777
  * Change the status of an attachment to \'PROCESSING\' after it has been uploaded.
703
778
  * Update the status of an uploaded attachment
@@ -18,6 +18,7 @@ import type { AgentMemoryConfigurationUio } from './AgentMemoryConfigurationUio'
18
18
  import type { AgentPatchEngineUio } from './AgentPatchEngineUio';
19
19
  import type { AgentSandboxConfigurationUio } from './AgentSandboxConfigurationUio';
20
20
  import type { AgentTypeUio } from './AgentTypeUio';
21
+ import type { AgentPendingToolsConfigurationUio } from './AgentPendingToolsConfigurationUio';
21
22
  /**
22
23
  *
23
24
  * @export
@@ -178,6 +179,12 @@ export interface AgentPatchUio {
178
179
  * @memberof AgentPatchUio
179
180
  */
180
181
  sandboxConfiguration?: AgentSandboxConfigurationUio | null;
182
+ /**
183
+ *
184
+ * @type {AgentPendingToolsConfigurationUio}
185
+ * @memberof AgentPatchUio
186
+ */
187
+ pendingToolsConfiguration?: AgentPendingToolsConfigurationUio | null;
181
188
  }
182
189
  /**
183
190
  * Check if a given object implements the AgentPatchUio interface.
@@ -27,6 +27,7 @@ const AgentMemoryConfigurationUio_1 = require("./AgentMemoryConfigurationUio");
27
27
  const AgentPatchEngineUio_1 = require("./AgentPatchEngineUio");
28
28
  const AgentSandboxConfigurationUio_1 = require("./AgentSandboxConfigurationUio");
29
29
  const AgentTypeUio_1 = require("./AgentTypeUio");
30
+ const AgentPendingToolsConfigurationUio_1 = require("./AgentPendingToolsConfigurationUio");
30
31
  /**
31
32
  * Check if a given object implements the AgentPatchUio interface.
32
33
  */
@@ -66,6 +67,7 @@ function AgentPatchUioFromJSONTyped(json, ignoreDiscriminator) {
66
67
  'contextualKnowledgeConversation': json['contextualKnowledgeConversation'] == null ? undefined : (0, ContextualKnowledgeConversationUio_1.ContextualKnowledgeConversationUioFromJSON)(json['contextualKnowledgeConversation']),
67
68
  'speechToText': json['speechToText'] == null ? undefined : (0, SpeechToTextConfigUio_1.SpeechToTextConfigUioFromJSON)(json['speechToText']),
68
69
  'sandboxConfiguration': json['sandboxConfiguration'] == null ? undefined : (0, AgentSandboxConfigurationUio_1.AgentSandboxConfigurationUioFromJSON)(json['sandboxConfiguration']),
70
+ 'pendingToolsConfiguration': json['pendingToolsConfiguration'] == null ? undefined : (0, AgentPendingToolsConfigurationUio_1.AgentPendingToolsConfigurationUioFromJSON)(json['pendingToolsConfiguration']),
69
71
  };
70
72
  }
71
73
  function AgentPatchUioToJSON(json) {
@@ -101,5 +103,6 @@ function AgentPatchUioToJSONTyped(value, ignoreDiscriminator = false) {
101
103
  'contextualKnowledgeConversation': (0, ContextualKnowledgeConversationUio_1.ContextualKnowledgeConversationUioToJSON)(value['contextualKnowledgeConversation']),
102
104
  'speechToText': (0, SpeechToTextConfigUio_1.SpeechToTextConfigUioToJSON)(value['speechToText']),
103
105
  'sandboxConfiguration': (0, AgentSandboxConfigurationUio_1.AgentSandboxConfigurationUioToJSON)(value['sandboxConfiguration']),
106
+ 'pendingToolsConfiguration': (0, AgentPendingToolsConfigurationUio_1.AgentPendingToolsConfigurationUioToJSON)(value['pendingToolsConfiguration']),
104
107
  };
105
108
  }
@@ -0,0 +1,38 @@
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
+ * Per-agent activation of deferred tools: those that suspend the chat turn until a client answers. Opt-in, because an agent whose client never answers would hang its turns. A tool is available only when the general switch is on AND the tool is listed.
14
+ * @export
15
+ * @interface AgentPendingToolsConfigurationUio
16
+ */
17
+ export interface AgentPendingToolsConfigurationUio {
18
+ /**
19
+ * General switch for deferred tools on this agent.
20
+ * @type {boolean}
21
+ * @memberof AgentPendingToolsConfigurationUio
22
+ */
23
+ enabled?: boolean;
24
+ /**
25
+ * Names of the allowed deferred tools, for instance take_screenshot. Listing tools here is what makes them available, so a new deferred tool needs no schema change.
26
+ * @type {Array<string>}
27
+ * @memberof AgentPendingToolsConfigurationUio
28
+ */
29
+ tools?: Array<string>;
30
+ }
31
+ /**
32
+ * Check if a given object implements the AgentPendingToolsConfigurationUio interface.
33
+ */
34
+ export declare function instanceOfAgentPendingToolsConfigurationUio(value: object): value is AgentPendingToolsConfigurationUio;
35
+ export declare function AgentPendingToolsConfigurationUioFromJSON(json: any): AgentPendingToolsConfigurationUio;
36
+ export declare function AgentPendingToolsConfigurationUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentPendingToolsConfigurationUio;
37
+ export declare function AgentPendingToolsConfigurationUioToJSON(json: any): AgentPendingToolsConfigurationUio;
38
+ export declare function AgentPendingToolsConfigurationUioToJSONTyped(value?: AgentPendingToolsConfigurationUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfAgentPendingToolsConfigurationUio = instanceOfAgentPendingToolsConfigurationUio;
17
+ exports.AgentPendingToolsConfigurationUioFromJSON = AgentPendingToolsConfigurationUioFromJSON;
18
+ exports.AgentPendingToolsConfigurationUioFromJSONTyped = AgentPendingToolsConfigurationUioFromJSONTyped;
19
+ exports.AgentPendingToolsConfigurationUioToJSON = AgentPendingToolsConfigurationUioToJSON;
20
+ exports.AgentPendingToolsConfigurationUioToJSONTyped = AgentPendingToolsConfigurationUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AgentPendingToolsConfigurationUio interface.
23
+ */
24
+ function instanceOfAgentPendingToolsConfigurationUio(value) {
25
+ return true;
26
+ }
27
+ function AgentPendingToolsConfigurationUioFromJSON(json) {
28
+ return AgentPendingToolsConfigurationUioFromJSONTyped(json, false);
29
+ }
30
+ function AgentPendingToolsConfigurationUioFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
36
+ 'tools': json['tools'] == null ? undefined : json['tools'],
37
+ };
38
+ }
39
+ function AgentPendingToolsConfigurationUioToJSON(json) {
40
+ return AgentPendingToolsConfigurationUioToJSONTyped(json, false);
41
+ }
42
+ function AgentPendingToolsConfigurationUioToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'enabled': value['enabled'],
48
+ 'tools': value['tools'],
49
+ };
50
+ }
@@ -10,17 +10,18 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { AgentRoleDetailsUio } from './AgentRoleDetailsUio';
13
- import type { AgentSubscriptionUio } from './AgentSubscriptionUio';
14
- import type { AgentToolUio } from './AgentToolUio';
15
13
  import type { ContextualKnowledgeConversationUio } from './ContextualKnowledgeConversationUio';
16
14
  import type { PersonaUio } from './PersonaUio';
17
- import type { AgentCreatorUio } from './AgentCreatorUio';
18
15
  import type { EngineUio } from './EngineUio';
19
16
  import type { PromptInitUio } from './PromptInitUio';
17
+ import type { AgentSandboxConfigurationUio } from './AgentSandboxConfigurationUio';
18
+ import type { AgentSubscriptionUio } from './AgentSubscriptionUio';
19
+ import type { AgentToolUio } from './AgentToolUio';
20
+ import type { AgentCreatorUio } from './AgentCreatorUio';
20
21
  import type { SpeechToTextConfigUio } from './SpeechToTextConfigUio';
21
22
  import type { AgentMemoryConfigurationUio } from './AgentMemoryConfigurationUio';
22
- import type { AgentSandboxConfigurationUio } from './AgentSandboxConfigurationUio';
23
23
  import type { AgentTypeUio } from './AgentTypeUio';
24
+ import type { AgentPendingToolsConfigurationUio } from './AgentPendingToolsConfigurationUio';
24
25
  /**
25
26
  *
26
27
  * @export
@@ -199,6 +200,12 @@ export interface AgentUio {
199
200
  * @memberof AgentUio
200
201
  */
201
202
  sandboxConfiguration?: AgentSandboxConfigurationUio | null;
203
+ /**
204
+ *
205
+ * @type {AgentPendingToolsConfigurationUio}
206
+ * @memberof AgentUio
207
+ */
208
+ pendingToolsConfiguration?: AgentPendingToolsConfigurationUio | null;
202
209
  /**
203
210
  *
204
211
  * @type {AgentCreatorUio}
@@ -20,17 +20,18 @@ exports.AgentUioFromJSONTyped = AgentUioFromJSONTyped;
20
20
  exports.AgentUioToJSON = AgentUioToJSON;
21
21
  exports.AgentUioToJSONTyped = AgentUioToJSONTyped;
22
22
  const AgentRoleDetailsUio_1 = require("./AgentRoleDetailsUio");
23
- const AgentSubscriptionUio_1 = require("./AgentSubscriptionUio");
24
- const AgentToolUio_1 = require("./AgentToolUio");
25
23
  const ContextualKnowledgeConversationUio_1 = require("./ContextualKnowledgeConversationUio");
26
24
  const PersonaUio_1 = require("./PersonaUio");
27
- const AgentCreatorUio_1 = require("./AgentCreatorUio");
28
25
  const EngineUio_1 = require("./EngineUio");
29
26
  const PromptInitUio_1 = require("./PromptInitUio");
27
+ const AgentSandboxConfigurationUio_1 = require("./AgentSandboxConfigurationUio");
28
+ const AgentSubscriptionUio_1 = require("./AgentSubscriptionUio");
29
+ const AgentToolUio_1 = require("./AgentToolUio");
30
+ const AgentCreatorUio_1 = require("./AgentCreatorUio");
30
31
  const SpeechToTextConfigUio_1 = require("./SpeechToTextConfigUio");
31
32
  const AgentMemoryConfigurationUio_1 = require("./AgentMemoryConfigurationUio");
32
- const AgentSandboxConfigurationUio_1 = require("./AgentSandboxConfigurationUio");
33
33
  const AgentTypeUio_1 = require("./AgentTypeUio");
34
+ const AgentPendingToolsConfigurationUio_1 = require("./AgentPendingToolsConfigurationUio");
34
35
  /**
35
36
  * @export
36
37
  */
@@ -99,6 +100,7 @@ function AgentUioFromJSONTyped(json, ignoreDiscriminator) {
99
100
  'contextualKnowledgeConversation': json['contextualKnowledgeConversation'] == null ? undefined : (0, ContextualKnowledgeConversationUio_1.ContextualKnowledgeConversationUioFromJSON)(json['contextualKnowledgeConversation']),
100
101
  'speechToText': json['speechToText'] == null ? undefined : (0, SpeechToTextConfigUio_1.SpeechToTextConfigUioFromJSON)(json['speechToText']),
101
102
  'sandboxConfiguration': json['sandboxConfiguration'] == null ? undefined : (0, AgentSandboxConfigurationUio_1.AgentSandboxConfigurationUioFromJSON)(json['sandboxConfiguration']),
103
+ 'pendingToolsConfiguration': json['pendingToolsConfiguration'] == null ? undefined : (0, AgentPendingToolsConfigurationUio_1.AgentPendingToolsConfigurationUioFromJSON)(json['pendingToolsConfiguration']),
102
104
  'creator': json['creator'] == null ? undefined : (0, AgentCreatorUio_1.AgentCreatorUioFromJSON)(json['creator']),
103
105
  'engineSource': json['engineSource'] == null ? undefined : json['engineSource'],
104
106
  'providerSource': json['providerSource'] == null ? undefined : json['providerSource'],
@@ -141,6 +143,7 @@ function AgentUioToJSONTyped(value, ignoreDiscriminator = false) {
141
143
  'contextualKnowledgeConversation': (0, ContextualKnowledgeConversationUio_1.ContextualKnowledgeConversationUioToJSON)(value['contextualKnowledgeConversation']),
142
144
  'speechToText': (0, SpeechToTextConfigUio_1.SpeechToTextConfigUioToJSON)(value['speechToText']),
143
145
  'sandboxConfiguration': (0, AgentSandboxConfigurationUio_1.AgentSandboxConfigurationUioToJSON)(value['sandboxConfiguration']),
146
+ 'pendingToolsConfiguration': (0, AgentPendingToolsConfigurationUio_1.AgentPendingToolsConfigurationUioToJSON)(value['pendingToolsConfiguration']),
144
147
  'creator': (0, AgentCreatorUio_1.AgentCreatorUioToJSON)(value['creator']),
145
148
  'engineSource': value['engineSource'],
146
149
  'providerSource': value['providerSource'],
@@ -0,0 +1,87 @@
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
+ * A file produced by a tool. Either url or inlineDataUrl is required; every other field is derived server-side when omitted.
14
+ * @export
15
+ * @interface ToolCallAttachmentUio
16
+ */
17
+ export interface ToolCallAttachmentUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ToolCallAttachmentUio
22
+ */
23
+ type?: ToolCallAttachmentUioTypeEnum;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ToolCallAttachmentUio
28
+ */
29
+ id?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ToolCallAttachmentUio
34
+ */
35
+ name?: string;
36
+ /**
37
+ * Defaults to image/png.
38
+ * @type {string}
39
+ * @memberof ToolCallAttachmentUio
40
+ */
41
+ mimeType?: string;
42
+ /**
43
+ * Defaults to the mimeType subtype.
44
+ * @type {string}
45
+ * @memberof ToolCallAttachmentUio
46
+ */
47
+ ext?: string;
48
+ /**
49
+ * Defaults to the decoded payload length.
50
+ * @type {number}
51
+ * @memberof ToolCallAttachmentUio
52
+ */
53
+ size?: number;
54
+ /**
55
+ * Storage key. Defaults to conversations/{conversationId}/attachments/{id}.{ext}.
56
+ * @type {string}
57
+ * @memberof ToolCallAttachmentUio
58
+ */
59
+ key?: string;
60
+ /**
61
+ * Downloadable URL, fetched server-side. Used when inlineDataUrl is absent.
62
+ * @type {string}
63
+ * @memberof ToolCallAttachmentUio
64
+ */
65
+ url?: string;
66
+ /**
67
+ * Base64 data URL: data:<mimeType>;base64,<data>
68
+ * @type {string}
69
+ * @memberof ToolCallAttachmentUio
70
+ */
71
+ inlineDataUrl?: string;
72
+ }
73
+ /**
74
+ * @export
75
+ */
76
+ export declare const ToolCallAttachmentUioTypeEnum: {
77
+ readonly Image: "image";
78
+ };
79
+ export type ToolCallAttachmentUioTypeEnum = typeof ToolCallAttachmentUioTypeEnum[keyof typeof ToolCallAttachmentUioTypeEnum];
80
+ /**
81
+ * Check if a given object implements the ToolCallAttachmentUio interface.
82
+ */
83
+ export declare function instanceOfToolCallAttachmentUio(value: object): value is ToolCallAttachmentUio;
84
+ export declare function ToolCallAttachmentUioFromJSON(json: any): ToolCallAttachmentUio;
85
+ export declare function ToolCallAttachmentUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolCallAttachmentUio;
86
+ export declare function ToolCallAttachmentUioToJSON(json: any): ToolCallAttachmentUio;
87
+ export declare function ToolCallAttachmentUioToJSONTyped(value?: ToolCallAttachmentUio | 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.ToolCallAttachmentUioTypeEnum = void 0;
17
+ exports.instanceOfToolCallAttachmentUio = instanceOfToolCallAttachmentUio;
18
+ exports.ToolCallAttachmentUioFromJSON = ToolCallAttachmentUioFromJSON;
19
+ exports.ToolCallAttachmentUioFromJSONTyped = ToolCallAttachmentUioFromJSONTyped;
20
+ exports.ToolCallAttachmentUioToJSON = ToolCallAttachmentUioToJSON;
21
+ exports.ToolCallAttachmentUioToJSONTyped = ToolCallAttachmentUioToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.ToolCallAttachmentUioTypeEnum = {
26
+ Image: 'image'
27
+ };
28
+ /**
29
+ * Check if a given object implements the ToolCallAttachmentUio interface.
30
+ */
31
+ function instanceOfToolCallAttachmentUio(value) {
32
+ return true;
33
+ }
34
+ function ToolCallAttachmentUioFromJSON(json) {
35
+ return ToolCallAttachmentUioFromJSONTyped(json, false);
36
+ }
37
+ function ToolCallAttachmentUioFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'type': json['type'] == null ? undefined : json['type'],
43
+ 'id': json['id'] == null ? undefined : json['id'],
44
+ 'name': json['name'] == null ? undefined : json['name'],
45
+ 'mimeType': json['mimeType'] == null ? undefined : json['mimeType'],
46
+ 'ext': json['ext'] == null ? undefined : json['ext'],
47
+ 'size': json['size'] == null ? undefined : json['size'],
48
+ 'key': json['key'] == null ? undefined : json['key'],
49
+ 'url': json['url'] == null ? undefined : json['url'],
50
+ 'inlineDataUrl': json['inlineDataUrl'] == null ? undefined : json['inlineDataUrl'],
51
+ };
52
+ }
53
+ function ToolCallAttachmentUioToJSON(json) {
54
+ return ToolCallAttachmentUioToJSONTyped(json, false);
55
+ }
56
+ function ToolCallAttachmentUioToJSONTyped(value, ignoreDiscriminator = false) {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+ return {
61
+ 'type': value['type'],
62
+ 'id': value['id'],
63
+ 'name': value['name'],
64
+ 'mimeType': value['mimeType'],
65
+ 'ext': value['ext'],
66
+ 'size': value['size'],
67
+ 'key': value['key'],
68
+ 'url': value['url'],
69
+ 'inlineDataUrl': value['inlineDataUrl'],
70
+ };
71
+ }
@@ -0,0 +1,60 @@
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 { ToolCallAttachmentUio } from './ToolCallAttachmentUio';
13
+ /**
14
+ * Result of a tool call, whatever the tool. output is handed to the model as the tool result; attachments are stored and added to the conversation context so the model can see them.
15
+ * @export
16
+ * @interface ToolCallResultRequestUio
17
+ */
18
+ export interface ToolCallResultRequestUio {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof ToolCallResultRequestUio
23
+ */
24
+ status: ToolCallResultRequestUioStatusEnum;
25
+ /**
26
+ * Text handed to the model. A default sentence is used when omitted.
27
+ * @type {string}
28
+ * @memberof ToolCallResultRequestUio
29
+ */
30
+ output?: string;
31
+ /**
32
+ * Only read when status is completed.
33
+ * @type {Array<ToolCallAttachmentUio>}
34
+ * @memberof ToolCallResultRequestUio
35
+ */
36
+ attachments?: Array<ToolCallAttachmentUio>;
37
+ /**
38
+ * Failure detail, surfaced to the model when status is failed.
39
+ * @type {string}
40
+ * @memberof ToolCallResultRequestUio
41
+ */
42
+ error?: string;
43
+ }
44
+ /**
45
+ * @export
46
+ */
47
+ export declare const ToolCallResultRequestUioStatusEnum: {
48
+ readonly Completed: "completed";
49
+ readonly Failed: "failed";
50
+ readonly Refused: "refused";
51
+ };
52
+ export type ToolCallResultRequestUioStatusEnum = typeof ToolCallResultRequestUioStatusEnum[keyof typeof ToolCallResultRequestUioStatusEnum];
53
+ /**
54
+ * Check if a given object implements the ToolCallResultRequestUio interface.
55
+ */
56
+ export declare function instanceOfToolCallResultRequestUio(value: object): value is ToolCallResultRequestUio;
57
+ export declare function ToolCallResultRequestUioFromJSON(json: any): ToolCallResultRequestUio;
58
+ export declare function ToolCallResultRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolCallResultRequestUio;
59
+ export declare function ToolCallResultRequestUioToJSON(json: any): ToolCallResultRequestUio;
60
+ export declare function ToolCallResultRequestUioToJSONTyped(value?: ToolCallResultRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,66 @@
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.ToolCallResultRequestUioStatusEnum = void 0;
17
+ exports.instanceOfToolCallResultRequestUio = instanceOfToolCallResultRequestUio;
18
+ exports.ToolCallResultRequestUioFromJSON = ToolCallResultRequestUioFromJSON;
19
+ exports.ToolCallResultRequestUioFromJSONTyped = ToolCallResultRequestUioFromJSONTyped;
20
+ exports.ToolCallResultRequestUioToJSON = ToolCallResultRequestUioToJSON;
21
+ exports.ToolCallResultRequestUioToJSONTyped = ToolCallResultRequestUioToJSONTyped;
22
+ const ToolCallAttachmentUio_1 = require("./ToolCallAttachmentUio");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.ToolCallResultRequestUioStatusEnum = {
27
+ Completed: 'completed',
28
+ Failed: 'failed',
29
+ Refused: 'refused'
30
+ };
31
+ /**
32
+ * Check if a given object implements the ToolCallResultRequestUio interface.
33
+ */
34
+ function instanceOfToolCallResultRequestUio(value) {
35
+ if (!('status' in value) || value['status'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function ToolCallResultRequestUioFromJSON(json) {
40
+ return ToolCallResultRequestUioFromJSONTyped(json, false);
41
+ }
42
+ function ToolCallResultRequestUioFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'status': json['status'],
48
+ 'output': json['output'] == null ? undefined : json['output'],
49
+ 'attachments': json['attachments'] == null ? undefined : (json['attachments'].map(ToolCallAttachmentUio_1.ToolCallAttachmentUioFromJSON)),
50
+ 'error': json['error'] == null ? undefined : json['error'],
51
+ };
52
+ }
53
+ function ToolCallResultRequestUioToJSON(json) {
54
+ return ToolCallResultRequestUioToJSONTyped(json, false);
55
+ }
56
+ function ToolCallResultRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+ return {
61
+ 'status': value['status'],
62
+ 'output': value['output'],
63
+ 'attachments': value['attachments'] == null ? undefined : (value['attachments'].map(ToolCallAttachmentUio_1.ToolCallAttachmentUioToJSON)),
64
+ 'error': value['error'],
65
+ };
66
+ }