@breign/client 1.0.160 → 1.0.162
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/AgentApi.d.ts +16 -1
- package/dist/apis/AgentApi.js +35 -0
- package/dist/models/ChunkContentCreateUio.d.ts +16 -1
- package/dist/models/ChunkContentCreateUio.js +9 -0
- package/dist/models/ConversationMessageImageUio.d.ts +44 -0
- package/dist/models/ConversationMessageImageUio.js +58 -0
- package/dist/models/ConversationMessageImagesUio.d.ts +33 -0
- package/dist/models/ConversationMessageImagesUio.js +51 -0
- package/dist/models/FileAttachmentUploadResponseUio.d.ts +16 -1
- package/dist/models/FileAttachmentUploadResponseUio.js +9 -0
- package/dist/models/FileCreationResponseUio.d.ts +17 -2
- package/dist/models/FileCreationResponseUio.js +9 -0
- package/dist/models/ImageAttachmentUploadResponseUio.d.ts +16 -1
- package/dist/models/ImageAttachmentUploadResponseUio.js +9 -0
- package/dist/models/S3UploadBodyUio.d.ts +17 -2
- package/dist/models/S3UploadBodyUio.js +9 -0
- package/dist/models/UploadImageToKnowledgeBaseLibrary200ResponseUio.d.ts +3 -4
- package/dist/models/UploadImageToKnowledgeBaseLibrary200ResponseUio.js +3 -2
- package/dist/models/UploadMethodUio.d.ts +25 -0
- package/dist/models/UploadMethodUio.js +51 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/dist/openapi.json +114 -12
- package/package.json +1 -1
package/dist/apis/AgentApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AddModuleRequestUio, AdvancedFlowEditorUio, AdvancedFlowEditorUpdateRequestUio, AgentDuplicateRequestUio, AgentFlowCreateUio, AgentFlowUio, AgentImportRequestUio, AgentImportResponseUio, AgentMetricsEventUio, AgentMetricsOverviewUio, AgentModuleUio, AgentPatchUio, AgentRequestUio, AgentSubscriptionUio, AgentToolAllowedMethodsRequestUio, AgentUio, AgentUsageMetricsUio, BodyWithIdUio, ChatUio, ConversationAttachmentDownloadUrlUio, DeleteMessageAudio200ResponseUio, EphemeralInstancesMetricsResponseUio, FileCreationRequestUio, FileCreationResponseUio, FlowEditorUio, FlowEditorUpdateRequestUio, MessageAudioDownloadUrlUio, OrgUsageMetricsResponseUio, S3UploadBodyUio, STTResponseUio } from '../models/index';
|
|
13
|
+
import type { AddModuleRequestUio, AdvancedFlowEditorUio, AdvancedFlowEditorUpdateRequestUio, AgentDuplicateRequestUio, AgentFlowCreateUio, AgentFlowUio, AgentImportRequestUio, AgentImportResponseUio, AgentMetricsEventUio, AgentMetricsOverviewUio, AgentModuleUio, AgentPatchUio, AgentRequestUio, AgentSubscriptionUio, AgentToolAllowedMethodsRequestUio, AgentUio, AgentUsageMetricsUio, BodyWithIdUio, ChatUio, ConversationAttachmentDownloadUrlUio, ConversationMessageImagesUio, DeleteMessageAudio200ResponseUio, EphemeralInstancesMetricsResponseUio, FileCreationRequestUio, FileCreationResponseUio, FlowEditorUio, FlowEditorUpdateRequestUio, MessageAudioDownloadUrlUio, OrgUsageMetricsResponseUio, S3UploadBodyUio, STTResponseUio } from '../models/index';
|
|
14
14
|
export interface AddModuleRequest {
|
|
15
15
|
agentId: string;
|
|
16
16
|
addModuleRequestUio: AddModuleRequestUio;
|
|
@@ -104,6 +104,11 @@ export interface GetConversationContextAttachmentDownloadUrlRequest {
|
|
|
104
104
|
conversationId: string;
|
|
105
105
|
attachmentId: string;
|
|
106
106
|
}
|
|
107
|
+
export interface GetConversationMessageImagesRequest {
|
|
108
|
+
agentId: string;
|
|
109
|
+
conversationId: string;
|
|
110
|
+
messageId: string;
|
|
111
|
+
}
|
|
107
112
|
export interface GetConversationsForAgentRequest {
|
|
108
113
|
agentId: string;
|
|
109
114
|
page?: number;
|
|
@@ -400,6 +405,16 @@ export declare class AgentApi extends runtime.BaseAPI {
|
|
|
400
405
|
* Get presigned download URL for a conversation context attachment
|
|
401
406
|
*/
|
|
402
407
|
getConversationContextAttachmentDownloadUrl(agentId: string, conversationId: string, attachmentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationAttachmentDownloadUrlUio>;
|
|
408
|
+
/**
|
|
409
|
+
* Returns the images of documents the language model received while answering, with presigned URLs created on each call. For an assistant message, the images of every tool message of its turn; for a tool (System) message, its own. Returns an empty list for a turn without images. Call this when displaying a message\'s \"consulted images\" block, live or in history.
|
|
410
|
+
* Get the document images the agent was given in a conversation turn
|
|
411
|
+
*/
|
|
412
|
+
getConversationMessageImagesRaw(requestParameters: GetConversationMessageImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationMessageImagesUio>>;
|
|
413
|
+
/**
|
|
414
|
+
* Returns the images of documents the language model received while answering, with presigned URLs created on each call. For an assistant message, the images of every tool message of its turn; for a tool (System) message, its own. Returns an empty list for a turn without images. Call this when displaying a message\'s \"consulted images\" block, live or in history.
|
|
415
|
+
* Get the document images the agent was given in a conversation turn
|
|
416
|
+
*/
|
|
417
|
+
getConversationMessageImages(agentId: string, conversationId: string, messageId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationMessageImagesUio>;
|
|
403
418
|
/**
|
|
404
419
|
* Get conversations for an agent
|
|
405
420
|
* Get conversations for an agent
|
package/dist/apis/AgentApi.js
CHANGED
|
@@ -742,6 +742,41 @@ class AgentApi extends runtime.BaseAPI {
|
|
|
742
742
|
const response = await this.getConversationContextAttachmentDownloadUrlRaw({ agentId: agentId, conversationId: conversationId, attachmentId: attachmentId }, initOverrides);
|
|
743
743
|
return await response.value();
|
|
744
744
|
}
|
|
745
|
+
/**
|
|
746
|
+
* Returns the images of documents the language model received while answering, with presigned URLs created on each call. For an assistant message, the images of every tool message of its turn; for a tool (System) message, its own. Returns an empty list for a turn without images. Call this when displaying a message\'s \"consulted images\" block, live or in history.
|
|
747
|
+
* Get the document images the agent was given in a conversation turn
|
|
748
|
+
*/
|
|
749
|
+
async getConversationMessageImagesRaw(requestParameters, initOverrides) {
|
|
750
|
+
if (requestParameters['agentId'] == null) {
|
|
751
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getConversationMessageImages().');
|
|
752
|
+
}
|
|
753
|
+
if (requestParameters['conversationId'] == null) {
|
|
754
|
+
throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling getConversationMessageImages().');
|
|
755
|
+
}
|
|
756
|
+
if (requestParameters['messageId'] == null) {
|
|
757
|
+
throw new runtime.RequiredError('messageId', 'Required parameter "messageId" was null or undefined when calling getConversationMessageImages().');
|
|
758
|
+
}
|
|
759
|
+
const queryParameters = {};
|
|
760
|
+
const headerParameters = {};
|
|
761
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
762
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
763
|
+
}
|
|
764
|
+
const response = await this.request({
|
|
765
|
+
path: `/agents/{agentId}/conversations/{conversationId}/messages/{messageId}/images`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))).replace(`{${"messageId"}}`, encodeURIComponent(String(requestParameters['messageId']))),
|
|
766
|
+
method: 'GET',
|
|
767
|
+
headers: headerParameters,
|
|
768
|
+
query: queryParameters,
|
|
769
|
+
}, initOverrides);
|
|
770
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ConversationMessageImagesUioFromJSON)(jsonValue));
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* Returns the images of documents the language model received while answering, with presigned URLs created on each call. For an assistant message, the images of every tool message of its turn; for a tool (System) message, its own. Returns an empty list for a turn without images. Call this when displaying a message\'s \"consulted images\" block, live or in history.
|
|
774
|
+
* Get the document images the agent was given in a conversation turn
|
|
775
|
+
*/
|
|
776
|
+
async getConversationMessageImages(agentId, conversationId, messageId, initOverrides) {
|
|
777
|
+
const response = await this.getConversationMessageImagesRaw({ agentId: agentId, conversationId: conversationId, messageId: messageId }, initOverrides);
|
|
778
|
+
return await response.value();
|
|
779
|
+
}
|
|
745
780
|
/**
|
|
746
781
|
* Get conversations for an agent
|
|
747
782
|
* Get conversations for an agent
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { UploadMethodUio } from './UploadMethodUio';
|
|
12
13
|
import type { FileStatusUio } from './FileStatusUio';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
@@ -17,13 +18,27 @@ import type { FileStatusUio } from './FileStatusUio';
|
|
|
17
18
|
*/
|
|
18
19
|
export interface ChunkContentCreateUio {
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
+
* Upload URL, to call with `method` despite its name.
|
|
21
22
|
* @type {string}
|
|
22
23
|
* @memberof ChunkContentCreateUio
|
|
23
24
|
*/
|
|
24
25
|
postURL: string;
|
|
25
26
|
/**
|
|
26
27
|
*
|
|
28
|
+
* @type {UploadMethodUio}
|
|
29
|
+
* @memberof ChunkContentCreateUio
|
|
30
|
+
*/
|
|
31
|
+
method: UploadMethodUio;
|
|
32
|
+
/**
|
|
33
|
+
* Headers to send with the upload request. Empty for POST.
|
|
34
|
+
* @type {{ [key: string]: string; }}
|
|
35
|
+
* @memberof ChunkContentCreateUio
|
|
36
|
+
*/
|
|
37
|
+
headers: {
|
|
38
|
+
[key: string]: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Form fields of a POST upload. Empty for PUT.
|
|
27
42
|
* @type {{ [key: string]: any; }}
|
|
28
43
|
* @memberof ChunkContentCreateUio
|
|
29
44
|
*/
|
|
@@ -18,6 +18,7 @@ exports.ChunkContentCreateUioFromJSON = ChunkContentCreateUioFromJSON;
|
|
|
18
18
|
exports.ChunkContentCreateUioFromJSONTyped = ChunkContentCreateUioFromJSONTyped;
|
|
19
19
|
exports.ChunkContentCreateUioToJSON = ChunkContentCreateUioToJSON;
|
|
20
20
|
exports.ChunkContentCreateUioToJSONTyped = ChunkContentCreateUioToJSONTyped;
|
|
21
|
+
const UploadMethodUio_1 = require("./UploadMethodUio");
|
|
21
22
|
const FileStatusUio_1 = require("./FileStatusUio");
|
|
22
23
|
/**
|
|
23
24
|
* Check if a given object implements the ChunkContentCreateUio interface.
|
|
@@ -25,6 +26,10 @@ const FileStatusUio_1 = require("./FileStatusUio");
|
|
|
25
26
|
function instanceOfChunkContentCreateUio(value) {
|
|
26
27
|
if (!('postURL' in value) || value['postURL'] === undefined)
|
|
27
28
|
return false;
|
|
29
|
+
if (!('method' in value) || value['method'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('headers' in value) || value['headers'] === undefined)
|
|
32
|
+
return false;
|
|
28
33
|
if (!('formData' in value) || value['formData'] === undefined)
|
|
29
34
|
return false;
|
|
30
35
|
if (!('fileName' in value) || value['fileName'] === undefined)
|
|
@@ -48,6 +53,8 @@ function ChunkContentCreateUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
53
|
}
|
|
49
54
|
return {
|
|
50
55
|
'postURL': json['postURL'],
|
|
56
|
+
'method': (0, UploadMethodUio_1.UploadMethodUioFromJSON)(json['method']),
|
|
57
|
+
'headers': json['headers'],
|
|
51
58
|
'formData': json['formData'],
|
|
52
59
|
'fileName': json['fileName'],
|
|
53
60
|
'contentType': json['contentType'],
|
|
@@ -66,6 +73,8 @@ function ChunkContentCreateUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
66
73
|
}
|
|
67
74
|
return {
|
|
68
75
|
'postURL': value['postURL'],
|
|
76
|
+
'method': (0, UploadMethodUio_1.UploadMethodUioToJSON)(value['method']),
|
|
77
|
+
'headers': value['headers'],
|
|
69
78
|
'formData': value['formData'],
|
|
70
79
|
'fileName': value['fileName'],
|
|
71
80
|
'contentType': value['contentType'],
|
|
@@ -0,0 +1,44 @@
|
|
|
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 ConversationMessageImageUio
|
|
16
|
+
*/
|
|
17
|
+
export interface ConversationMessageImageUio {
|
|
18
|
+
/**
|
|
19
|
+
* Identifier of the image within its document (16 hexadecimal characters)
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ConversationMessageImageUio
|
|
22
|
+
*/
|
|
23
|
+
imageId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Alternative text of the image, empty when the document gives none
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ConversationMessageImageUio
|
|
28
|
+
*/
|
|
29
|
+
alt: string;
|
|
30
|
+
/**
|
|
31
|
+
* Presigned download URL, short-lived and created on each call
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ConversationMessageImageUio
|
|
34
|
+
*/
|
|
35
|
+
url: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the ConversationMessageImageUio interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfConversationMessageImageUio(value: object): value is ConversationMessageImageUio;
|
|
41
|
+
export declare function ConversationMessageImageUioFromJSON(json: any): ConversationMessageImageUio;
|
|
42
|
+
export declare function ConversationMessageImageUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationMessageImageUio;
|
|
43
|
+
export declare function ConversationMessageImageUioToJSON(json: any): ConversationMessageImageUio;
|
|
44
|
+
export declare function ConversationMessageImageUioToJSONTyped(value?: ConversationMessageImageUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
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.instanceOfConversationMessageImageUio = instanceOfConversationMessageImageUio;
|
|
17
|
+
exports.ConversationMessageImageUioFromJSON = ConversationMessageImageUioFromJSON;
|
|
18
|
+
exports.ConversationMessageImageUioFromJSONTyped = ConversationMessageImageUioFromJSONTyped;
|
|
19
|
+
exports.ConversationMessageImageUioToJSON = ConversationMessageImageUioToJSON;
|
|
20
|
+
exports.ConversationMessageImageUioToJSONTyped = ConversationMessageImageUioToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ConversationMessageImageUio interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfConversationMessageImageUio(value) {
|
|
25
|
+
if (!('imageId' in value) || value['imageId'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('alt' in value) || value['alt'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('url' in value) || value['url'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function ConversationMessageImageUioFromJSON(json) {
|
|
34
|
+
return ConversationMessageImageUioFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function ConversationMessageImageUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'imageId': json['imageId'],
|
|
42
|
+
'alt': json['alt'],
|
|
43
|
+
'url': json['url'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function ConversationMessageImageUioToJSON(json) {
|
|
47
|
+
return ConversationMessageImageUioToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function ConversationMessageImageUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'imageId': value['imageId'],
|
|
55
|
+
'alt': value['alt'],
|
|
56
|
+
'url': value['url'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { ConversationMessageImageUio } from './ConversationMessageImageUio';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ConversationMessageImagesUio
|
|
17
|
+
*/
|
|
18
|
+
export interface ConversationMessageImagesUio {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<ConversationMessageImageUio>}
|
|
22
|
+
* @memberof ConversationMessageImagesUio
|
|
23
|
+
*/
|
|
24
|
+
images: Array<ConversationMessageImageUio>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the ConversationMessageImagesUio interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfConversationMessageImagesUio(value: object): value is ConversationMessageImagesUio;
|
|
30
|
+
export declare function ConversationMessageImagesUioFromJSON(json: any): ConversationMessageImagesUio;
|
|
31
|
+
export declare function ConversationMessageImagesUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationMessageImagesUio;
|
|
32
|
+
export declare function ConversationMessageImagesUioToJSON(json: any): ConversationMessageImagesUio;
|
|
33
|
+
export declare function ConversationMessageImagesUioToJSONTyped(value?: ConversationMessageImagesUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
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.instanceOfConversationMessageImagesUio = instanceOfConversationMessageImagesUio;
|
|
17
|
+
exports.ConversationMessageImagesUioFromJSON = ConversationMessageImagesUioFromJSON;
|
|
18
|
+
exports.ConversationMessageImagesUioFromJSONTyped = ConversationMessageImagesUioFromJSONTyped;
|
|
19
|
+
exports.ConversationMessageImagesUioToJSON = ConversationMessageImagesUioToJSON;
|
|
20
|
+
exports.ConversationMessageImagesUioToJSONTyped = ConversationMessageImagesUioToJSONTyped;
|
|
21
|
+
const ConversationMessageImageUio_1 = require("./ConversationMessageImageUio");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ConversationMessageImagesUio interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfConversationMessageImagesUio(value) {
|
|
26
|
+
if (!('images' in value) || value['images'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function ConversationMessageImagesUioFromJSON(json) {
|
|
31
|
+
return ConversationMessageImagesUioFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function ConversationMessageImagesUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'images': (json['images'].map(ConversationMessageImageUio_1.ConversationMessageImageUioFromJSON)),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function ConversationMessageImagesUioToJSON(json) {
|
|
42
|
+
return ConversationMessageImagesUioToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function ConversationMessageImagesUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'images': (value['images'].map(ConversationMessageImageUio_1.ConversationMessageImageUioToJSON)),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { UploadMethodUio } from './UploadMethodUio';
|
|
12
13
|
import type { AttachmentTypeUio } from './AttachmentTypeUio';
|
|
13
14
|
import type { FileAttachmentProcessedUio } from './FileAttachmentProcessedUio';
|
|
14
15
|
import type { FileAttachmentStatusUio } from './FileAttachmentStatusUio';
|
|
@@ -103,13 +104,27 @@ export interface FileAttachmentUploadResponseUio {
|
|
|
103
104
|
*/
|
|
104
105
|
processed?: FileAttachmentProcessedUio;
|
|
105
106
|
/**
|
|
106
|
-
*
|
|
107
|
+
* Upload URL, to call with `method` despite its name.
|
|
107
108
|
* @type {string}
|
|
108
109
|
* @memberof FileAttachmentUploadResponseUio
|
|
109
110
|
*/
|
|
110
111
|
postURL: string;
|
|
111
112
|
/**
|
|
112
113
|
*
|
|
114
|
+
* @type {UploadMethodUio}
|
|
115
|
+
* @memberof FileAttachmentUploadResponseUio
|
|
116
|
+
*/
|
|
117
|
+
method: UploadMethodUio;
|
|
118
|
+
/**
|
|
119
|
+
* Headers to send with the upload request. Empty for POST.
|
|
120
|
+
* @type {{ [key: string]: string; }}
|
|
121
|
+
* @memberof FileAttachmentUploadResponseUio
|
|
122
|
+
*/
|
|
123
|
+
headers: {
|
|
124
|
+
[key: string]: string;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Form fields of a POST upload. Empty for PUT.
|
|
113
128
|
* @type {{ [key: string]: any; }}
|
|
114
129
|
* @memberof FileAttachmentUploadResponseUio
|
|
115
130
|
*/
|
|
@@ -19,6 +19,7 @@ exports.FileAttachmentUploadResponseUioFromJSON = FileAttachmentUploadResponseUi
|
|
|
19
19
|
exports.FileAttachmentUploadResponseUioFromJSONTyped = FileAttachmentUploadResponseUioFromJSONTyped;
|
|
20
20
|
exports.FileAttachmentUploadResponseUioToJSON = FileAttachmentUploadResponseUioToJSON;
|
|
21
21
|
exports.FileAttachmentUploadResponseUioToJSONTyped = FileAttachmentUploadResponseUioToJSONTyped;
|
|
22
|
+
const UploadMethodUio_1 = require("./UploadMethodUio");
|
|
22
23
|
const AttachmentTypeUio_1 = require("./AttachmentTypeUio");
|
|
23
24
|
const FileAttachmentProcessedUio_1 = require("./FileAttachmentProcessedUio");
|
|
24
25
|
const FileAttachmentStatusUio_1 = require("./FileAttachmentStatusUio");
|
|
@@ -50,6 +51,10 @@ function instanceOfFileAttachmentUploadResponseUio(value) {
|
|
|
50
51
|
return false;
|
|
51
52
|
if (!('postURL' in value) || value['postURL'] === undefined)
|
|
52
53
|
return false;
|
|
54
|
+
if (!('method' in value) || value['method'] === undefined)
|
|
55
|
+
return false;
|
|
56
|
+
if (!('headers' in value) || value['headers'] === undefined)
|
|
57
|
+
return false;
|
|
53
58
|
if (!('formData' in value) || value['formData'] === undefined)
|
|
54
59
|
return false;
|
|
55
60
|
return true;
|
|
@@ -77,6 +82,8 @@ function FileAttachmentUploadResponseUioFromJSONTyped(json, ignoreDiscriminator)
|
|
|
77
82
|
'maxTokens': json['maxTokens'] == null ? undefined : json['maxTokens'],
|
|
78
83
|
'processed': json['processed'] == null ? undefined : (0, FileAttachmentProcessedUio_1.FileAttachmentProcessedUioFromJSON)(json['processed']),
|
|
79
84
|
'postURL': json['postURL'],
|
|
85
|
+
'method': (0, UploadMethodUio_1.UploadMethodUioFromJSON)(json['method']),
|
|
86
|
+
'headers': json['headers'],
|
|
80
87
|
'formData': json['formData'],
|
|
81
88
|
};
|
|
82
89
|
}
|
|
@@ -103,6 +110,8 @@ function FileAttachmentUploadResponseUioToJSONTyped(value, ignoreDiscriminator =
|
|
|
103
110
|
'maxTokens': value['maxTokens'],
|
|
104
111
|
'processed': (0, FileAttachmentProcessedUio_1.FileAttachmentProcessedUioToJSON)(value['processed']),
|
|
105
112
|
'postURL': value['postURL'],
|
|
113
|
+
'method': (0, UploadMethodUio_1.UploadMethodUioToJSON)(value['method']),
|
|
114
|
+
'headers': value['headers'],
|
|
106
115
|
'formData': value['formData'],
|
|
107
116
|
};
|
|
108
117
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { UploadMethodUio } from './UploadMethodUio';
|
|
12
13
|
import type { FileStatusUio } from './FileStatusUio';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
@@ -89,13 +90,13 @@ export interface FileCreationResponseUio {
|
|
|
89
90
|
*/
|
|
90
91
|
size?: number;
|
|
91
92
|
/**
|
|
92
|
-
*
|
|
93
|
+
* Upload URL, to call with `method` despite its name.
|
|
93
94
|
* @type {string}
|
|
94
95
|
* @memberof FileCreationResponseUio
|
|
95
96
|
*/
|
|
96
97
|
postURL: string;
|
|
97
98
|
/**
|
|
98
|
-
*
|
|
99
|
+
* Form fields of a POST upload. Empty for PUT.
|
|
99
100
|
* @type {{ [key: string]: any; }}
|
|
100
101
|
* @memberof FileCreationResponseUio
|
|
101
102
|
*/
|
|
@@ -132,6 +133,20 @@ export interface FileCreationResponseUio {
|
|
|
132
133
|
* @memberof FileCreationResponseUio
|
|
133
134
|
*/
|
|
134
135
|
isActive?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
*
|
|
138
|
+
* @type {UploadMethodUio}
|
|
139
|
+
* @memberof FileCreationResponseUio
|
|
140
|
+
*/
|
|
141
|
+
method: UploadMethodUio;
|
|
142
|
+
/**
|
|
143
|
+
* Headers to send with the upload request. Empty for POST.
|
|
144
|
+
* @type {{ [key: string]: string; }}
|
|
145
|
+
* @memberof FileCreationResponseUio
|
|
146
|
+
*/
|
|
147
|
+
headers: {
|
|
148
|
+
[key: string]: string;
|
|
149
|
+
};
|
|
135
150
|
}
|
|
136
151
|
/**
|
|
137
152
|
* @export
|
|
@@ -19,6 +19,7 @@ exports.FileCreationResponseUioFromJSON = FileCreationResponseUioFromJSON;
|
|
|
19
19
|
exports.FileCreationResponseUioFromJSONTyped = FileCreationResponseUioFromJSONTyped;
|
|
20
20
|
exports.FileCreationResponseUioToJSON = FileCreationResponseUioToJSON;
|
|
21
21
|
exports.FileCreationResponseUioToJSONTyped = FileCreationResponseUioToJSONTyped;
|
|
22
|
+
const UploadMethodUio_1 = require("./UploadMethodUio");
|
|
22
23
|
const FileStatusUio_1 = require("./FileStatusUio");
|
|
23
24
|
/**
|
|
24
25
|
* @export
|
|
@@ -38,6 +39,10 @@ function instanceOfFileCreationResponseUio(value) {
|
|
|
38
39
|
return false;
|
|
39
40
|
if (!('formData' in value) || value['formData'] === undefined)
|
|
40
41
|
return false;
|
|
42
|
+
if (!('method' in value) || value['method'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('headers' in value) || value['headers'] === undefined)
|
|
45
|
+
return false;
|
|
41
46
|
return true;
|
|
42
47
|
}
|
|
43
48
|
function FileCreationResponseUioFromJSON(json) {
|
|
@@ -67,6 +72,8 @@ function FileCreationResponseUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
67
72
|
'status': json['status'] == null ? undefined : (0, FileStatusUio_1.FileStatusUioFromJSON)(json['status']),
|
|
68
73
|
'error': json['error'] == null ? undefined : json['error'],
|
|
69
74
|
'isActive': json['isActive'] == null ? undefined : json['isActive'],
|
|
75
|
+
'method': (0, UploadMethodUio_1.UploadMethodUioFromJSON)(json['method']),
|
|
76
|
+
'headers': json['headers'],
|
|
70
77
|
};
|
|
71
78
|
}
|
|
72
79
|
function FileCreationResponseUioToJSON(json) {
|
|
@@ -96,5 +103,7 @@ function FileCreationResponseUioToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
96
103
|
'status': (0, FileStatusUio_1.FileStatusUioToJSON)(value['status']),
|
|
97
104
|
'error': value['error'],
|
|
98
105
|
'isActive': value['isActive'],
|
|
106
|
+
'method': (0, UploadMethodUio_1.UploadMethodUioToJSON)(value['method']),
|
|
107
|
+
'headers': value['headers'],
|
|
99
108
|
};
|
|
100
109
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { UploadMethodUio } from './UploadMethodUio';
|
|
12
13
|
import type { FileAttachmentStatusUio } from './FileAttachmentStatusUio';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
@@ -77,13 +78,27 @@ export interface ImageAttachmentUploadResponseUio {
|
|
|
77
78
|
*/
|
|
78
79
|
status: FileAttachmentStatusUio;
|
|
79
80
|
/**
|
|
80
|
-
*
|
|
81
|
+
* Upload URL, to call with `method` despite its name.
|
|
81
82
|
* @type {string}
|
|
82
83
|
* @memberof ImageAttachmentUploadResponseUio
|
|
83
84
|
*/
|
|
84
85
|
postURL: string;
|
|
85
86
|
/**
|
|
86
87
|
*
|
|
88
|
+
* @type {UploadMethodUio}
|
|
89
|
+
* @memberof ImageAttachmentUploadResponseUio
|
|
90
|
+
*/
|
|
91
|
+
method: UploadMethodUio;
|
|
92
|
+
/**
|
|
93
|
+
* Headers to send with the upload request. Empty for POST.
|
|
94
|
+
* @type {{ [key: string]: string; }}
|
|
95
|
+
* @memberof ImageAttachmentUploadResponseUio
|
|
96
|
+
*/
|
|
97
|
+
headers: {
|
|
98
|
+
[key: string]: string;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Form fields of a POST upload. Empty for PUT.
|
|
87
102
|
* @type {{ [key: string]: any; }}
|
|
88
103
|
* @memberof ImageAttachmentUploadResponseUio
|
|
89
104
|
*/
|
|
@@ -19,6 +19,7 @@ exports.ImageAttachmentUploadResponseUioFromJSON = ImageAttachmentUploadResponse
|
|
|
19
19
|
exports.ImageAttachmentUploadResponseUioFromJSONTyped = ImageAttachmentUploadResponseUioFromJSONTyped;
|
|
20
20
|
exports.ImageAttachmentUploadResponseUioToJSON = ImageAttachmentUploadResponseUioToJSON;
|
|
21
21
|
exports.ImageAttachmentUploadResponseUioToJSONTyped = ImageAttachmentUploadResponseUioToJSONTyped;
|
|
22
|
+
const UploadMethodUio_1 = require("./UploadMethodUio");
|
|
22
23
|
const FileAttachmentStatusUio_1 = require("./FileAttachmentStatusUio");
|
|
23
24
|
/**
|
|
24
25
|
* @export
|
|
@@ -48,6 +49,10 @@ function instanceOfImageAttachmentUploadResponseUio(value) {
|
|
|
48
49
|
return false;
|
|
49
50
|
if (!('postURL' in value) || value['postURL'] === undefined)
|
|
50
51
|
return false;
|
|
52
|
+
if (!('method' in value) || value['method'] === undefined)
|
|
53
|
+
return false;
|
|
54
|
+
if (!('headers' in value) || value['headers'] === undefined)
|
|
55
|
+
return false;
|
|
51
56
|
if (!('formData' in value) || value['formData'] === undefined)
|
|
52
57
|
return false;
|
|
53
58
|
return true;
|
|
@@ -71,6 +76,8 @@ function ImageAttachmentUploadResponseUioFromJSONTyped(json, ignoreDiscriminator
|
|
|
71
76
|
'inlineDataUrl': json['inlineDataUrl'] == null ? undefined : json['inlineDataUrl'],
|
|
72
77
|
'status': (0, FileAttachmentStatusUio_1.FileAttachmentStatusUioFromJSON)(json['status']),
|
|
73
78
|
'postURL': json['postURL'],
|
|
79
|
+
'method': (0, UploadMethodUio_1.UploadMethodUioFromJSON)(json['method']),
|
|
80
|
+
'headers': json['headers'],
|
|
74
81
|
'formData': json['formData'],
|
|
75
82
|
};
|
|
76
83
|
}
|
|
@@ -93,6 +100,8 @@ function ImageAttachmentUploadResponseUioToJSONTyped(value, ignoreDiscriminator
|
|
|
93
100
|
'inlineDataUrl': value['inlineDataUrl'],
|
|
94
101
|
'status': (0, FileAttachmentStatusUio_1.FileAttachmentStatusUioToJSON)(value['status']),
|
|
95
102
|
'postURL': value['postURL'],
|
|
103
|
+
'method': (0, UploadMethodUio_1.UploadMethodUioToJSON)(value['method']),
|
|
104
|
+
'headers': value['headers'],
|
|
96
105
|
'formData': value['formData'],
|
|
97
106
|
};
|
|
98
107
|
}
|
|
@@ -9,20 +9,35 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { UploadMethodUio } from './UploadMethodUio';
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
* Presigned upload target. `method` tells how to send the file: POST is a multipart form with the `formData` fields then the file as `file`; PUT is the raw file as body with `headers`.
|
|
14
15
|
* @export
|
|
15
16
|
* @interface S3UploadBodyUio
|
|
16
17
|
*/
|
|
17
18
|
export interface S3UploadBodyUio {
|
|
18
19
|
/**
|
|
19
|
-
*
|
|
20
|
+
* Upload URL, to call with `method` despite its name.
|
|
20
21
|
* @type {string}
|
|
21
22
|
* @memberof S3UploadBodyUio
|
|
22
23
|
*/
|
|
23
24
|
postURL: string;
|
|
24
25
|
/**
|
|
25
26
|
*
|
|
27
|
+
* @type {UploadMethodUio}
|
|
28
|
+
* @memberof S3UploadBodyUio
|
|
29
|
+
*/
|
|
30
|
+
method: UploadMethodUio;
|
|
31
|
+
/**
|
|
32
|
+
* Headers to send with the upload request. Empty for POST.
|
|
33
|
+
* @type {{ [key: string]: string; }}
|
|
34
|
+
* @memberof S3UploadBodyUio
|
|
35
|
+
*/
|
|
36
|
+
headers: {
|
|
37
|
+
[key: string]: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Form fields of a POST upload. Empty for PUT.
|
|
26
41
|
* @type {{ [key: string]: any; }}
|
|
27
42
|
* @memberof S3UploadBodyUio
|
|
28
43
|
*/
|
|
@@ -18,12 +18,17 @@ exports.S3UploadBodyUioFromJSON = S3UploadBodyUioFromJSON;
|
|
|
18
18
|
exports.S3UploadBodyUioFromJSONTyped = S3UploadBodyUioFromJSONTyped;
|
|
19
19
|
exports.S3UploadBodyUioToJSON = S3UploadBodyUioToJSON;
|
|
20
20
|
exports.S3UploadBodyUioToJSONTyped = S3UploadBodyUioToJSONTyped;
|
|
21
|
+
const UploadMethodUio_1 = require("./UploadMethodUio");
|
|
21
22
|
/**
|
|
22
23
|
* Check if a given object implements the S3UploadBodyUio interface.
|
|
23
24
|
*/
|
|
24
25
|
function instanceOfS3UploadBodyUio(value) {
|
|
25
26
|
if (!('postURL' in value) || value['postURL'] === undefined)
|
|
26
27
|
return false;
|
|
28
|
+
if (!('method' in value) || value['method'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('headers' in value) || value['headers'] === undefined)
|
|
31
|
+
return false;
|
|
27
32
|
if (!('formData' in value) || value['formData'] === undefined)
|
|
28
33
|
return false;
|
|
29
34
|
return true;
|
|
@@ -37,6 +42,8 @@ function S3UploadBodyUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
42
|
}
|
|
38
43
|
return {
|
|
39
44
|
'postURL': json['postURL'],
|
|
45
|
+
'method': (0, UploadMethodUio_1.UploadMethodUioFromJSON)(json['method']),
|
|
46
|
+
'headers': json['headers'],
|
|
40
47
|
'formData': json['formData'],
|
|
41
48
|
};
|
|
42
49
|
}
|
|
@@ -49,6 +56,8 @@ function S3UploadBodyUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
49
56
|
}
|
|
50
57
|
return {
|
|
51
58
|
'postURL': value['postURL'],
|
|
59
|
+
'method': (0, UploadMethodUio_1.UploadMethodUioToJSON)(value['method']),
|
|
60
|
+
'headers': value['headers'],
|
|
52
61
|
'formData': value['formData'],
|
|
53
62
|
};
|
|
54
63
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ImageKnowledgeUio } from './ImageKnowledgeUio';
|
|
13
|
+
import type { S3UploadBodyUio } from './S3UploadBodyUio';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* @export
|
|
@@ -24,12 +25,10 @@ export interface UploadImageToKnowledgeBaseLibrary200ResponseUio {
|
|
|
24
25
|
image: ImageKnowledgeUio;
|
|
25
26
|
/**
|
|
26
27
|
*
|
|
27
|
-
* @type {
|
|
28
|
+
* @type {S3UploadBodyUio}
|
|
28
29
|
* @memberof UploadImageToKnowledgeBaseLibrary200ResponseUio
|
|
29
30
|
*/
|
|
30
|
-
presigned:
|
|
31
|
-
[key: string]: any;
|
|
32
|
-
};
|
|
31
|
+
presigned: S3UploadBodyUio;
|
|
33
32
|
}
|
|
34
33
|
/**
|
|
35
34
|
* Check if a given object implements the UploadImageToKnowledgeBaseLibrary200ResponseUio interface.
|
|
@@ -19,6 +19,7 @@ exports.UploadImageToKnowledgeBaseLibrary200ResponseUioFromJSONTyped = UploadIma
|
|
|
19
19
|
exports.UploadImageToKnowledgeBaseLibrary200ResponseUioToJSON = UploadImageToKnowledgeBaseLibrary200ResponseUioToJSON;
|
|
20
20
|
exports.UploadImageToKnowledgeBaseLibrary200ResponseUioToJSONTyped = UploadImageToKnowledgeBaseLibrary200ResponseUioToJSONTyped;
|
|
21
21
|
const ImageKnowledgeUio_1 = require("./ImageKnowledgeUio");
|
|
22
|
+
const S3UploadBodyUio_1 = require("./S3UploadBodyUio");
|
|
22
23
|
/**
|
|
23
24
|
* Check if a given object implements the UploadImageToKnowledgeBaseLibrary200ResponseUio interface.
|
|
24
25
|
*/
|
|
@@ -38,7 +39,7 @@ function UploadImageToKnowledgeBaseLibrary200ResponseUioFromJSONTyped(json, igno
|
|
|
38
39
|
}
|
|
39
40
|
return {
|
|
40
41
|
'image': (0, ImageKnowledgeUio_1.ImageKnowledgeUioFromJSON)(json['image']),
|
|
41
|
-
'presigned': json['presigned'],
|
|
42
|
+
'presigned': (0, S3UploadBodyUio_1.S3UploadBodyUioFromJSON)(json['presigned']),
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
function UploadImageToKnowledgeBaseLibrary200ResponseUioToJSON(json) {
|
|
@@ -50,6 +51,6 @@ function UploadImageToKnowledgeBaseLibrary200ResponseUioToJSONTyped(value, ignor
|
|
|
50
51
|
}
|
|
51
52
|
return {
|
|
52
53
|
'image': (0, ImageKnowledgeUio_1.ImageKnowledgeUioToJSON)(value['image']),
|
|
53
|
-
'presigned': value['presigned'],
|
|
54
|
+
'presigned': (0, S3UploadBodyUio_1.S3UploadBodyUioToJSON)(value['presigned']),
|
|
54
55
|
};
|
|
55
56
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 to send the file to `postURL`, set by the storage provider.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const UploadMethodUio: {
|
|
17
|
+
readonly Post: "POST";
|
|
18
|
+
readonly Put: "PUT";
|
|
19
|
+
};
|
|
20
|
+
export type UploadMethodUio = typeof UploadMethodUio[keyof typeof UploadMethodUio];
|
|
21
|
+
export declare function instanceOfUploadMethodUio(value: any): boolean;
|
|
22
|
+
export declare function UploadMethodUioFromJSON(json: any): UploadMethodUio;
|
|
23
|
+
export declare function UploadMethodUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadMethodUio;
|
|
24
|
+
export declare function UploadMethodUioToJSON(value?: UploadMethodUio | null): any;
|
|
25
|
+
export declare function UploadMethodUioToJSONTyped(value: any, ignoreDiscriminator: boolean): UploadMethodUio;
|
|
@@ -0,0 +1,51 @@
|
|
|
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.UploadMethodUio = void 0;
|
|
17
|
+
exports.instanceOfUploadMethodUio = instanceOfUploadMethodUio;
|
|
18
|
+
exports.UploadMethodUioFromJSON = UploadMethodUioFromJSON;
|
|
19
|
+
exports.UploadMethodUioFromJSONTyped = UploadMethodUioFromJSONTyped;
|
|
20
|
+
exports.UploadMethodUioToJSON = UploadMethodUioToJSON;
|
|
21
|
+
exports.UploadMethodUioToJSONTyped = UploadMethodUioToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* How to send the file to `postURL`, set by the storage provider.
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.UploadMethodUio = {
|
|
27
|
+
Post: 'POST',
|
|
28
|
+
Put: 'PUT'
|
|
29
|
+
};
|
|
30
|
+
function instanceOfUploadMethodUio(value) {
|
|
31
|
+
for (const key in exports.UploadMethodUio) {
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(exports.UploadMethodUio, key)) {
|
|
33
|
+
if (exports.UploadMethodUio[key] === value) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
function UploadMethodUioFromJSON(json) {
|
|
41
|
+
return UploadMethodUioFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function UploadMethodUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
function UploadMethodUioToJSON(value) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
function UploadMethodUioToJSONTyped(value, ignoreDiscriminator) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -188,6 +188,8 @@ export * from './ConversationDetailUio';
|
|
|
188
188
|
export * from './ConversationHumanRequestRequestedByUio';
|
|
189
189
|
export * from './ConversationHumanRequestUio';
|
|
190
190
|
export * from './ConversationMessageApprovalUio';
|
|
191
|
+
export * from './ConversationMessageImageUio';
|
|
192
|
+
export * from './ConversationMessageImagesUio';
|
|
191
193
|
export * from './ConversationMessagesInnerFlowNodeEntrypointsUio';
|
|
192
194
|
export * from './ConversationMessagesInnerFlowNodeUio';
|
|
193
195
|
export * from './ConversationMessagesInnerSuggestionsInnerUio';
|
|
@@ -496,6 +498,7 @@ export * from './UpdateToolStaticCredentialsRequestUio';
|
|
|
496
498
|
export * from './UpdateUserChatPreferencesRequestUio';
|
|
497
499
|
export * from './UploadImageToKnowledgeBaseLibrary200ResponseUio';
|
|
498
500
|
export * from './UploadImageToKnowledgeBaseLibraryRequestUio';
|
|
501
|
+
export * from './UploadMethodUio';
|
|
499
502
|
export * from './UploadedStatusUpdateRequestUio';
|
|
500
503
|
export * from './UserAccessRolesRequestUio';
|
|
501
504
|
export * from './UserAccessUio';
|
package/dist/models/index.js
CHANGED
|
@@ -206,6 +206,8 @@ __exportStar(require("./ConversationDetailUio"), exports);
|
|
|
206
206
|
__exportStar(require("./ConversationHumanRequestRequestedByUio"), exports);
|
|
207
207
|
__exportStar(require("./ConversationHumanRequestUio"), exports);
|
|
208
208
|
__exportStar(require("./ConversationMessageApprovalUio"), exports);
|
|
209
|
+
__exportStar(require("./ConversationMessageImageUio"), exports);
|
|
210
|
+
__exportStar(require("./ConversationMessageImagesUio"), exports);
|
|
209
211
|
__exportStar(require("./ConversationMessagesInnerFlowNodeEntrypointsUio"), exports);
|
|
210
212
|
__exportStar(require("./ConversationMessagesInnerFlowNodeUio"), exports);
|
|
211
213
|
__exportStar(require("./ConversationMessagesInnerSuggestionsInnerUio"), exports);
|
|
@@ -514,6 +516,7 @@ __exportStar(require("./UpdateToolStaticCredentialsRequestUio"), exports);
|
|
|
514
516
|
__exportStar(require("./UpdateUserChatPreferencesRequestUio"), exports);
|
|
515
517
|
__exportStar(require("./UploadImageToKnowledgeBaseLibrary200ResponseUio"), exports);
|
|
516
518
|
__exportStar(require("./UploadImageToKnowledgeBaseLibraryRequestUio"), exports);
|
|
519
|
+
__exportStar(require("./UploadMethodUio"), exports);
|
|
517
520
|
__exportStar(require("./UploadedStatusUpdateRequestUio"), exports);
|
|
518
521
|
__exportStar(require("./UserAccessRolesRequestUio"), exports);
|
|
519
522
|
__exportStar(require("./UserAccessUio"), exports);
|
package/dist/openapi.json
CHANGED
|
@@ -2349,6 +2349,61 @@
|
|
|
2349
2349
|
"tags" : [ "agent" ]
|
|
2350
2350
|
}
|
|
2351
2351
|
},
|
|
2352
|
+
"/agents/{agentId}/conversations/{conversationId}/messages/{messageId}/images" : {
|
|
2353
|
+
"get" : {
|
|
2354
|
+
"description" : "Returns the images of documents the language model received while answering, with presigned\nURLs created on each call. For an assistant message, the images of every tool message of its\nturn; for a tool (System) message, its own. Returns an empty list for a turn without images.\nCall this when displaying a message's \"consulted images\" block, live or in history.\n",
|
|
2355
|
+
"operationId" : "getConversationMessageImages",
|
|
2356
|
+
"parameters" : [ {
|
|
2357
|
+
"description" : "ID of the agent",
|
|
2358
|
+
"in" : "path",
|
|
2359
|
+
"name" : "agentId",
|
|
2360
|
+
"required" : true,
|
|
2361
|
+
"schema" : {
|
|
2362
|
+
"format" : "uuid",
|
|
2363
|
+
"type" : "string"
|
|
2364
|
+
}
|
|
2365
|
+
}, {
|
|
2366
|
+
"description" : "The ID of the conversation",
|
|
2367
|
+
"in" : "path",
|
|
2368
|
+
"name" : "conversationId",
|
|
2369
|
+
"required" : true,
|
|
2370
|
+
"schema" : {
|
|
2371
|
+
"type" : "string"
|
|
2372
|
+
}
|
|
2373
|
+
}, {
|
|
2374
|
+
"description" : "The ID of the message",
|
|
2375
|
+
"in" : "path",
|
|
2376
|
+
"name" : "messageId",
|
|
2377
|
+
"required" : true,
|
|
2378
|
+
"schema" : {
|
|
2379
|
+
"type" : "string"
|
|
2380
|
+
}
|
|
2381
|
+
} ],
|
|
2382
|
+
"responses" : {
|
|
2383
|
+
"200" : {
|
|
2384
|
+
"content" : {
|
|
2385
|
+
"application/json" : {
|
|
2386
|
+
"schema" : {
|
|
2387
|
+
"$ref" : "#/components/schemas/ConversationMessageImages"
|
|
2388
|
+
}
|
|
2389
|
+
}
|
|
2390
|
+
},
|
|
2391
|
+
"description" : "The images of the turn, each with a short-lived presigned URL"
|
|
2392
|
+
},
|
|
2393
|
+
"401" : {
|
|
2394
|
+
"description" : "Unauthorized"
|
|
2395
|
+
},
|
|
2396
|
+
"403" : {
|
|
2397
|
+
"description" : "Forbidden - User doesn't have access to this agent"
|
|
2398
|
+
},
|
|
2399
|
+
"404" : {
|
|
2400
|
+
"description" : "Agent, conversation, or message not found, or the message is a user message"
|
|
2401
|
+
}
|
|
2402
|
+
},
|
|
2403
|
+
"summary" : "Get the document images the agent was given in a conversation turn",
|
|
2404
|
+
"tags" : [ "agent" ]
|
|
2405
|
+
}
|
|
2406
|
+
},
|
|
2352
2407
|
"/agents/{agentId}/scheduled-tasks" : {
|
|
2353
2408
|
"get" : {
|
|
2354
2409
|
"operationId" : "listScheduledTasks",
|
|
@@ -16396,6 +16451,15 @@
|
|
|
16396
16451
|
"type" : "string"
|
|
16397
16452
|
}
|
|
16398
16453
|
},
|
|
16454
|
+
"messageIdPath" : {
|
|
16455
|
+
"description" : "The ID of the message",
|
|
16456
|
+
"in" : "path",
|
|
16457
|
+
"name" : "messageId",
|
|
16458
|
+
"required" : true,
|
|
16459
|
+
"schema" : {
|
|
16460
|
+
"type" : "string"
|
|
16461
|
+
}
|
|
16462
|
+
},
|
|
16399
16463
|
"taskIdPath" : {
|
|
16400
16464
|
"description" : "ID of the scheduled task",
|
|
16401
16465
|
"in" : "path",
|
|
@@ -16691,15 +16755,6 @@
|
|
|
16691
16755
|
"type" : "boolean"
|
|
16692
16756
|
}
|
|
16693
16757
|
},
|
|
16694
|
-
"messageIdPath" : {
|
|
16695
|
-
"description" : "The ID of the message",
|
|
16696
|
-
"in" : "path",
|
|
16697
|
-
"name" : "messageId",
|
|
16698
|
-
"required" : true,
|
|
16699
|
-
"schema" : {
|
|
16700
|
-
"type" : "string"
|
|
16701
|
-
}
|
|
16702
|
-
},
|
|
16703
16758
|
"languagePath" : {
|
|
16704
16759
|
"description" : "Language code",
|
|
16705
16760
|
"in" : "path",
|
|
@@ -18465,16 +18520,29 @@
|
|
|
18465
18520
|
"type" : "object"
|
|
18466
18521
|
},
|
|
18467
18522
|
"S3UploadBody" : {
|
|
18523
|
+
"description" : "Presigned upload target. `method` tells how to send the file: POST is a multipart form with the `formData` fields then the file as `file`; PUT is the raw file as body with `headers`.",
|
|
18468
18524
|
"properties" : {
|
|
18469
18525
|
"postURL" : {
|
|
18526
|
+
"description" : "Upload URL, to call with `method` despite its name.",
|
|
18470
18527
|
"type" : "string"
|
|
18471
18528
|
},
|
|
18529
|
+
"method" : {
|
|
18530
|
+
"$ref" : "#/components/schemas/UploadMethod"
|
|
18531
|
+
},
|
|
18532
|
+
"headers" : {
|
|
18533
|
+
"additionalProperties" : {
|
|
18534
|
+
"type" : "string"
|
|
18535
|
+
},
|
|
18536
|
+
"description" : "Headers to send with the upload request. Empty for POST.",
|
|
18537
|
+
"type" : "object"
|
|
18538
|
+
},
|
|
18472
18539
|
"formData" : {
|
|
18473
18540
|
"additionalProperties" : true,
|
|
18541
|
+
"description" : "Form fields of a POST upload. Empty for PUT.",
|
|
18474
18542
|
"type" : "object"
|
|
18475
18543
|
}
|
|
18476
18544
|
},
|
|
18477
|
-
"required" : [ "formData", "postURL" ],
|
|
18545
|
+
"required" : [ "formData", "headers", "method", "postURL" ],
|
|
18478
18546
|
"type" : "object"
|
|
18479
18547
|
},
|
|
18480
18548
|
"STTResponse" : {
|
|
@@ -18981,6 +19049,36 @@
|
|
|
18981
19049
|
"required" : [ "url" ],
|
|
18982
19050
|
"type" : "object"
|
|
18983
19051
|
},
|
|
19052
|
+
"ConversationMessageImages" : {
|
|
19053
|
+
"properties" : {
|
|
19054
|
+
"images" : {
|
|
19055
|
+
"items" : {
|
|
19056
|
+
"$ref" : "#/components/schemas/ConversationMessageImage"
|
|
19057
|
+
},
|
|
19058
|
+
"type" : "array"
|
|
19059
|
+
}
|
|
19060
|
+
},
|
|
19061
|
+
"required" : [ "images" ],
|
|
19062
|
+
"type" : "object"
|
|
19063
|
+
},
|
|
19064
|
+
"ConversationMessageImage" : {
|
|
19065
|
+
"properties" : {
|
|
19066
|
+
"imageId" : {
|
|
19067
|
+
"description" : "Identifier of the image within its document (16 hexadecimal characters)",
|
|
19068
|
+
"type" : "string"
|
|
19069
|
+
},
|
|
19070
|
+
"alt" : {
|
|
19071
|
+
"description" : "Alternative text of the image, empty when the document gives none",
|
|
19072
|
+
"type" : "string"
|
|
19073
|
+
},
|
|
19074
|
+
"url" : {
|
|
19075
|
+
"description" : "Presigned download URL, short-lived and created on each call",
|
|
19076
|
+
"type" : "string"
|
|
19077
|
+
}
|
|
19078
|
+
},
|
|
19079
|
+
"required" : [ "alt", "imageId", "url" ],
|
|
19080
|
+
"type" : "object"
|
|
19081
|
+
},
|
|
18984
19082
|
"ScheduledTaskList" : {
|
|
18985
19083
|
"properties" : {
|
|
18986
19084
|
"tasks" : {
|
|
@@ -25680,6 +25778,11 @@
|
|
|
25680
25778
|
"required" : [ "apps", "engine", "flow", "knowledgeBases", "skills", "tools" ],
|
|
25681
25779
|
"type" : "object"
|
|
25682
25780
|
},
|
|
25781
|
+
"UploadMethod" : {
|
|
25782
|
+
"description" : "How to send the file to `postURL`, set by the storage provider.",
|
|
25783
|
+
"enum" : [ "POST", "PUT" ],
|
|
25784
|
+
"type" : "string"
|
|
25785
|
+
},
|
|
25683
25786
|
"ChatMessageRole" : {
|
|
25684
25787
|
"enum" : [ "USER", "ASSISTANT", "SYSTEM" ],
|
|
25685
25788
|
"type" : "string"
|
|
@@ -26188,8 +26291,7 @@
|
|
|
26188
26291
|
"$ref" : "#/components/schemas/ImageKnowledge"
|
|
26189
26292
|
},
|
|
26190
26293
|
"presigned" : {
|
|
26191
|
-
"
|
|
26192
|
-
"type" : "object"
|
|
26294
|
+
"$ref" : "#/components/schemas/S3UploadBody"
|
|
26193
26295
|
}
|
|
26194
26296
|
},
|
|
26195
26297
|
"required" : [ "image", "presigned" ],
|