@l7mp/tivadar-ai-api-sdk 0.1.1 → 0.1.3
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/README.md +1213 -172
- package/dist/api-client.d.ts +7 -7
- package/dist/api-client.js +6 -6
- package/dist/apis/RAGApi.d.ts +27 -27
- package/dist/apis/RAGApi.js +55 -55
- package/dist/esm/api-client.d.ts +7 -7
- package/dist/esm/api-client.js +6 -6
- package/dist/esm/apis/RAGApi.d.ts +27 -27
- package/dist/esm/apis/RAGApi.js +54 -54
- package/dist/esm/models/OrganizationsOrganizationIdSttProvidersGet200ResponseInner.d.ts +6 -5
- package/dist/esm/models/OrganizationsOrganizationIdSttProvidersGet200ResponseInner.js +7 -6
- package/dist/esm/models/OrganizationsOrganizationIdSttProvidersGet200ResponseInnerModelsInner.d.ts +56 -0
- package/dist/esm/models/OrganizationsOrganizationIdSttProvidersGet200ResponseInnerModelsInner.js +49 -0
- package/dist/esm/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInner.d.ts +6 -6
- package/dist/esm/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInner.js +7 -7
- package/dist/esm/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInnerModelsInner.d.ts +51 -0
- package/dist/esm/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInnerModelsInner.js +48 -0
- package/dist/esm/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInnerModelsInnerVoicesInner.d.ts +50 -0
- package/dist/esm/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInnerModelsInnerVoicesInner.js +47 -0
- package/dist/esm/models/VoiceAgent.d.ts +1 -1
- package/dist/esm/models/VoiceAgent.js +3 -1
- package/dist/esm/models/VoiceAgentCreate.d.ts +1 -1
- package/dist/esm/models/VoiceAgentCreate.js +3 -1
- package/dist/esm/models/VoiceAgentWithSipTrunks.d.ts +1 -1
- package/dist/esm/models/VoiceAgentWithSipTrunks.js +3 -1
- package/dist/esm/models/index.d.ts +3 -1
- package/dist/esm/models/index.js +3 -1
- package/dist/models/OrganizationsOrganizationIdSttProvidersGet200ResponseInner.d.ts +6 -5
- package/dist/models/OrganizationsOrganizationIdSttProvidersGet200ResponseInner.js +7 -6
- package/dist/models/OrganizationsOrganizationIdSttProvidersGet200ResponseInnerModelsInner.d.ts +56 -0
- package/dist/models/OrganizationsOrganizationIdSttProvidersGet200ResponseInnerModelsInner.js +56 -0
- package/dist/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInner.d.ts +6 -6
- package/dist/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInner.js +7 -7
- package/dist/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInnerModelsInner.d.ts +51 -0
- package/dist/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInnerModelsInner.js +55 -0
- package/dist/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInnerModelsInnerVoicesInner.d.ts +50 -0
- package/dist/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInnerModelsInnerVoicesInner.js +54 -0
- package/dist/models/VoiceAgent.d.ts +1 -1
- package/dist/models/VoiceAgent.js +3 -1
- package/dist/models/VoiceAgentCreate.d.ts +1 -1
- package/dist/models/VoiceAgentCreate.js +3 -1
- package/dist/models/VoiceAgentWithSipTrunks.d.ts +1 -1
- package/dist/models/VoiceAgentWithSipTrunks.js +3 -1
- package/dist/models/index.d.ts +3 -1
- package/dist/models/index.js +3 -1
- package/package.json +1 -1
- package/src/api-client.ts +13 -13
- package/src/apis/RAGApi.ts +74 -74
- package/src/models/OrganizationsOrganizationIdSttProvidersGet200ResponseInner.ts +19 -11
- package/src/models/OrganizationsOrganizationIdSttProvidersGet200ResponseInnerModelsInner.ts +97 -0
- package/src/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInner.ts +17 -17
- package/src/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInnerModelsInner.ts +97 -0
- package/src/models/OrganizationsOrganizationIdTtsProvidersGet200ResponseInnerModelsInnerVoicesInner.ts +89 -0
- package/src/models/VoiceAgent.ts +3 -2
- package/src/models/VoiceAgentCreate.ts +3 -2
- package/src/models/VoiceAgentWithSipTrunks.ts +3 -2
- package/src/models/index.ts +3 -1
package/dist/api-client.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { InvitationsApi } from "./apis/InvitationsApi";
|
|
|
5
5
|
import { MembersApi } from "./apis/MembersApi";
|
|
6
6
|
import { OrganizationsApi } from "./apis/OrganizationsApi";
|
|
7
7
|
import { PlaygroundApi } from "./apis/PlaygroundApi";
|
|
8
|
-
import { RAGApi, type
|
|
8
|
+
import { RAGApi, type OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum } from "./apis/RAGApi";
|
|
9
9
|
import { RecordingsApi } from "./apis/RecordingsApi";
|
|
10
10
|
import { SIPApi } from "./apis/SIPApi";
|
|
11
11
|
import { EmbeddingProvidersApi } from "./apis/EmbeddingProvidersApi";
|
|
@@ -71,13 +71,13 @@ export declare class Api {
|
|
|
71
71
|
readonly rag: {
|
|
72
72
|
list: (organizationId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagGet"]>;
|
|
73
73
|
create: (organizationId: string, ragConfigCreate: RagConfigCreate, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagPost"]>;
|
|
74
|
-
delete: (organizationId: string,
|
|
74
|
+
delete: (organizationId: string, ragConfigName: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDelete"]>;
|
|
75
75
|
documents: {
|
|
76
|
-
upload: (organizationId: string,
|
|
77
|
-
list: (organizationId: string,
|
|
78
|
-
get: (organizationId: string,
|
|
79
|
-
replace: (organizationId: string,
|
|
80
|
-
delete: (organizationId: string,
|
|
76
|
+
upload: (organizationId: string, ragConfigName: string, file: File, sourceUrl?: string, metadata?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsPost"]>;
|
|
77
|
+
list: (organizationId: string, ragConfigName: string, status?: OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsGet"]>;
|
|
78
|
+
get: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet"]>;
|
|
79
|
+
replace: (organizationId: string, ragConfigName: string, documentId: string, file: File, sourceUrl?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut"]>;
|
|
80
|
+
delete: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete"]>;
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
83
|
readonly sip: {
|
package/dist/api-client.js
CHANGED
|
@@ -101,13 +101,13 @@ class Api {
|
|
|
101
101
|
this.rag = {
|
|
102
102
|
list: (organizationId, options) => this.ragApi.organizationsOrganizationIdRagGet({ organizationId }, options),
|
|
103
103
|
create: (organizationId, ragConfigCreate, options) => this.ragApi.organizationsOrganizationIdRagPost({ organizationId, ragConfigCreate }, options),
|
|
104
|
-
delete: (organizationId,
|
|
104
|
+
delete: (organizationId, ragConfigName, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDelete({ organizationId, ragConfigName }, options),
|
|
105
105
|
documents: {
|
|
106
|
-
upload: (organizationId,
|
|
107
|
-
list: (organizationId,
|
|
108
|
-
get: (organizationId,
|
|
109
|
-
replace: (organizationId,
|
|
110
|
-
delete: (organizationId,
|
|
106
|
+
upload: (organizationId, ragConfigName, file, sourceUrl, metadata, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsPost({ organizationId, ragConfigName, file, sourceUrl, metadata }, options),
|
|
107
|
+
list: (organizationId, ragConfigName, status, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsGet({ organizationId, ragConfigName, status }, options),
|
|
108
|
+
get: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet({ organizationId, ragConfigName, documentId }, options),
|
|
109
|
+
replace: (organizationId, ragConfigName, documentId, file, sourceUrl, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut({ organizationId, ragConfigName, documentId, file, sourceUrl }, options),
|
|
110
|
+
delete: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete({ organizationId, ragConfigName, documentId }, options),
|
|
111
111
|
},
|
|
112
112
|
};
|
|
113
113
|
this.sip = {
|
package/dist/apis/RAGApi.d.ts
CHANGED
|
@@ -18,35 +18,35 @@ export interface OrganizationsOrganizationIdRagPostRequest {
|
|
|
18
18
|
organizationId: string;
|
|
19
19
|
ragConfigCreate: RagConfigCreate;
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface OrganizationsOrganizationIdRagRagConfigNameDeleteRequest {
|
|
22
22
|
organizationId: string;
|
|
23
|
-
|
|
23
|
+
ragConfigName: string;
|
|
24
24
|
}
|
|
25
|
-
export interface
|
|
25
|
+
export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDeleteRequest {
|
|
26
26
|
organizationId: string;
|
|
27
|
-
|
|
27
|
+
ragConfigName: string;
|
|
28
28
|
documentId: string;
|
|
29
29
|
}
|
|
30
|
-
export interface
|
|
30
|
+
export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGetRequest {
|
|
31
31
|
organizationId: string;
|
|
32
|
-
|
|
32
|
+
ragConfigName: string;
|
|
33
33
|
documentId: string;
|
|
34
34
|
}
|
|
35
|
-
export interface
|
|
35
|
+
export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPutRequest {
|
|
36
36
|
organizationId: string;
|
|
37
|
-
|
|
37
|
+
ragConfigName: string;
|
|
38
38
|
documentId: string;
|
|
39
39
|
file: Blob;
|
|
40
40
|
sourceUrl?: string;
|
|
41
41
|
}
|
|
42
|
-
export interface
|
|
42
|
+
export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsGetRequest {
|
|
43
43
|
organizationId: string;
|
|
44
|
-
|
|
45
|
-
status?:
|
|
44
|
+
ragConfigName: string;
|
|
45
|
+
status?: OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum;
|
|
46
46
|
}
|
|
47
|
-
export interface
|
|
47
|
+
export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsPostRequest {
|
|
48
48
|
organizationId: string;
|
|
49
|
-
|
|
49
|
+
ragConfigName: string;
|
|
50
50
|
file: Blob;
|
|
51
51
|
sourceUrl?: string;
|
|
52
52
|
metadata?: string;
|
|
@@ -74,59 +74,59 @@ export declare class RAGApi extends runtime.BaseAPI {
|
|
|
74
74
|
/**
|
|
75
75
|
* Delete a RAG configuration
|
|
76
76
|
*/
|
|
77
|
-
|
|
77
|
+
organizationsOrganizationIdRagRagConfigNameDeleteRaw(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
78
78
|
/**
|
|
79
79
|
* Delete a RAG configuration
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
organizationsOrganizationIdRagRagConfigNameDelete(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
82
82
|
/**
|
|
83
83
|
* Delete a document from a RAG configuration
|
|
84
84
|
*/
|
|
85
|
-
|
|
85
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDeleteRaw(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
86
86
|
/**
|
|
87
87
|
* Delete a document from a RAG configuration
|
|
88
88
|
*/
|
|
89
|
-
|
|
89
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
90
90
|
/**
|
|
91
91
|
* Get document chunks
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGetRaw(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RagDocumentChunkList>>;
|
|
94
94
|
/**
|
|
95
95
|
* Get document chunks
|
|
96
96
|
*/
|
|
97
|
-
|
|
97
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RagDocumentChunkList>;
|
|
98
98
|
/**
|
|
99
99
|
* Replace a document in a RAG configuration
|
|
100
100
|
*/
|
|
101
|
-
|
|
101
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPutRaw(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RagDocument>>;
|
|
102
102
|
/**
|
|
103
103
|
* Replace a document in a RAG configuration
|
|
104
104
|
*/
|
|
105
|
-
|
|
105
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RagDocument>;
|
|
106
106
|
/**
|
|
107
107
|
* List documents in a RAG configuration
|
|
108
108
|
*/
|
|
109
|
-
|
|
109
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsGetRaw(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RagDocumentList>>;
|
|
110
110
|
/**
|
|
111
111
|
* List documents in a RAG configuration
|
|
112
112
|
*/
|
|
113
|
-
|
|
113
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsGet(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RagDocumentList>;
|
|
114
114
|
/**
|
|
115
115
|
* Upload a document to a RAG configuration
|
|
116
116
|
*/
|
|
117
|
-
|
|
117
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsPostRaw(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RagDocument>>;
|
|
118
118
|
/**
|
|
119
119
|
* Upload a document to a RAG configuration
|
|
120
120
|
*/
|
|
121
|
-
|
|
121
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsPost(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RagDocument>;
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* @export
|
|
125
125
|
*/
|
|
126
|
-
export declare const
|
|
126
|
+
export declare const OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum: {
|
|
127
127
|
readonly Pending: "pending";
|
|
128
128
|
readonly Processing: "processing";
|
|
129
129
|
readonly Completed: "completed";
|
|
130
130
|
readonly Failed: "failed";
|
|
131
131
|
};
|
|
132
|
-
export type
|
|
132
|
+
export type OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum = typeof OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum[keyof typeof OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum];
|
package/dist/apis/RAGApi.js
CHANGED
|
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
25
|
+
exports.OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum = exports.RAGApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
27
|
const index_1 = require("../models/index");
|
|
28
28
|
/**
|
|
@@ -111,13 +111,13 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
111
111
|
/**
|
|
112
112
|
* Delete a RAG configuration
|
|
113
113
|
*/
|
|
114
|
-
|
|
114
|
+
organizationsOrganizationIdRagRagConfigNameDeleteRaw(requestParameters, initOverrides) {
|
|
115
115
|
return __awaiter(this, void 0, void 0, function* () {
|
|
116
116
|
if (requestParameters['organizationId'] == null) {
|
|
117
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
117
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDelete().');
|
|
118
118
|
}
|
|
119
|
-
if (requestParameters['
|
|
120
|
-
throw new runtime.RequiredError('
|
|
119
|
+
if (requestParameters['ragConfigName'] == null) {
|
|
120
|
+
throw new runtime.RequiredError('ragConfigName', 'Required parameter "ragConfigName" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDelete().');
|
|
121
121
|
}
|
|
122
122
|
const queryParameters = {};
|
|
123
123
|
const headerParameters = {};
|
|
@@ -128,9 +128,9 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
128
128
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
let urlPath = `/organizations/{organizationId}/rag/{
|
|
131
|
+
let urlPath = `/organizations/{organizationId}/rag/{ragConfigName}`;
|
|
132
132
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
133
|
-
urlPath = urlPath.replace(`{${"
|
|
133
|
+
urlPath = urlPath.replace(`{${"ragConfigName"}}`, encodeURIComponent(String(requestParameters['ragConfigName'])));
|
|
134
134
|
const response = yield this.request({
|
|
135
135
|
path: urlPath,
|
|
136
136
|
method: 'DELETE',
|
|
@@ -143,24 +143,24 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
143
143
|
/**
|
|
144
144
|
* Delete a RAG configuration
|
|
145
145
|
*/
|
|
146
|
-
|
|
146
|
+
organizationsOrganizationIdRagRagConfigNameDelete(requestParameters, initOverrides) {
|
|
147
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
-
yield this.
|
|
148
|
+
yield this.organizationsOrganizationIdRagRagConfigNameDeleteRaw(requestParameters, initOverrides);
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
152
152
|
* Delete a document from a RAG configuration
|
|
153
153
|
*/
|
|
154
|
-
|
|
154
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDeleteRaw(requestParameters, initOverrides) {
|
|
155
155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
156
156
|
if (requestParameters['organizationId'] == null) {
|
|
157
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
157
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete().');
|
|
158
158
|
}
|
|
159
|
-
if (requestParameters['
|
|
160
|
-
throw new runtime.RequiredError('
|
|
159
|
+
if (requestParameters['ragConfigName'] == null) {
|
|
160
|
+
throw new runtime.RequiredError('ragConfigName', 'Required parameter "ragConfigName" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete().');
|
|
161
161
|
}
|
|
162
162
|
if (requestParameters['documentId'] == null) {
|
|
163
|
-
throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling
|
|
163
|
+
throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete().');
|
|
164
164
|
}
|
|
165
165
|
const queryParameters = {};
|
|
166
166
|
const headerParameters = {};
|
|
@@ -171,9 +171,9 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
171
171
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
let urlPath = `/organizations/{organizationId}/rag/{
|
|
174
|
+
let urlPath = `/organizations/{organizationId}/rag/{ragConfigName}/documents/{documentId}`;
|
|
175
175
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
176
|
-
urlPath = urlPath.replace(`{${"
|
|
176
|
+
urlPath = urlPath.replace(`{${"ragConfigName"}}`, encodeURIComponent(String(requestParameters['ragConfigName'])));
|
|
177
177
|
urlPath = urlPath.replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters['documentId'])));
|
|
178
178
|
const response = yield this.request({
|
|
179
179
|
path: urlPath,
|
|
@@ -187,24 +187,24 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
187
187
|
/**
|
|
188
188
|
* Delete a document from a RAG configuration
|
|
189
189
|
*/
|
|
190
|
-
|
|
190
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete(requestParameters, initOverrides) {
|
|
191
191
|
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
-
yield this.
|
|
192
|
+
yield this.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDeleteRaw(requestParameters, initOverrides);
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
195
|
/**
|
|
196
196
|
* Get document chunks
|
|
197
197
|
*/
|
|
198
|
-
|
|
198
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGetRaw(requestParameters, initOverrides) {
|
|
199
199
|
return __awaiter(this, void 0, void 0, function* () {
|
|
200
200
|
if (requestParameters['organizationId'] == null) {
|
|
201
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
201
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet().');
|
|
202
202
|
}
|
|
203
|
-
if (requestParameters['
|
|
204
|
-
throw new runtime.RequiredError('
|
|
203
|
+
if (requestParameters['ragConfigName'] == null) {
|
|
204
|
+
throw new runtime.RequiredError('ragConfigName', 'Required parameter "ragConfigName" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet().');
|
|
205
205
|
}
|
|
206
206
|
if (requestParameters['documentId'] == null) {
|
|
207
|
-
throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling
|
|
207
|
+
throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet().');
|
|
208
208
|
}
|
|
209
209
|
const queryParameters = {};
|
|
210
210
|
const headerParameters = {};
|
|
@@ -215,9 +215,9 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
215
215
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
let urlPath = `/organizations/{organizationId}/rag/{
|
|
218
|
+
let urlPath = `/organizations/{organizationId}/rag/{ragConfigName}/documents/{documentId}`;
|
|
219
219
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
220
|
-
urlPath = urlPath.replace(`{${"
|
|
220
|
+
urlPath = urlPath.replace(`{${"ragConfigName"}}`, encodeURIComponent(String(requestParameters['ragConfigName'])));
|
|
221
221
|
urlPath = urlPath.replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters['documentId'])));
|
|
222
222
|
const response = yield this.request({
|
|
223
223
|
path: urlPath,
|
|
@@ -231,28 +231,28 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
231
231
|
/**
|
|
232
232
|
* Get document chunks
|
|
233
233
|
*/
|
|
234
|
-
|
|
234
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet(requestParameters, initOverrides) {
|
|
235
235
|
return __awaiter(this, void 0, void 0, function* () {
|
|
236
|
-
const response = yield this.
|
|
236
|
+
const response = yield this.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGetRaw(requestParameters, initOverrides);
|
|
237
237
|
return yield response.value();
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
240
|
/**
|
|
241
241
|
* Replace a document in a RAG configuration
|
|
242
242
|
*/
|
|
243
|
-
|
|
243
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPutRaw(requestParameters, initOverrides) {
|
|
244
244
|
return __awaiter(this, void 0, void 0, function* () {
|
|
245
245
|
if (requestParameters['organizationId'] == null) {
|
|
246
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
246
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut().');
|
|
247
247
|
}
|
|
248
|
-
if (requestParameters['
|
|
249
|
-
throw new runtime.RequiredError('
|
|
248
|
+
if (requestParameters['ragConfigName'] == null) {
|
|
249
|
+
throw new runtime.RequiredError('ragConfigName', 'Required parameter "ragConfigName" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut().');
|
|
250
250
|
}
|
|
251
251
|
if (requestParameters['documentId'] == null) {
|
|
252
|
-
throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling
|
|
252
|
+
throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut().');
|
|
253
253
|
}
|
|
254
254
|
if (requestParameters['file'] == null) {
|
|
255
|
-
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling
|
|
255
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut().');
|
|
256
256
|
}
|
|
257
257
|
const queryParameters = {};
|
|
258
258
|
const headerParameters = {};
|
|
@@ -284,9 +284,9 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
284
284
|
if (requestParameters['sourceUrl'] != null) {
|
|
285
285
|
formParams.append('source_url', requestParameters['sourceUrl']);
|
|
286
286
|
}
|
|
287
|
-
let urlPath = `/organizations/{organizationId}/rag/{
|
|
287
|
+
let urlPath = `/organizations/{organizationId}/rag/{ragConfigName}/documents/{documentId}`;
|
|
288
288
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
289
|
-
urlPath = urlPath.replace(`{${"
|
|
289
|
+
urlPath = urlPath.replace(`{${"ragConfigName"}}`, encodeURIComponent(String(requestParameters['ragConfigName'])));
|
|
290
290
|
urlPath = urlPath.replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters['documentId'])));
|
|
291
291
|
const response = yield this.request({
|
|
292
292
|
path: urlPath,
|
|
@@ -301,22 +301,22 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
301
301
|
/**
|
|
302
302
|
* Replace a document in a RAG configuration
|
|
303
303
|
*/
|
|
304
|
-
|
|
304
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut(requestParameters, initOverrides) {
|
|
305
305
|
return __awaiter(this, void 0, void 0, function* () {
|
|
306
|
-
const response = yield this.
|
|
306
|
+
const response = yield this.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPutRaw(requestParameters, initOverrides);
|
|
307
307
|
return yield response.value();
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
310
|
/**
|
|
311
311
|
* List documents in a RAG configuration
|
|
312
312
|
*/
|
|
313
|
-
|
|
313
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsGetRaw(requestParameters, initOverrides) {
|
|
314
314
|
return __awaiter(this, void 0, void 0, function* () {
|
|
315
315
|
if (requestParameters['organizationId'] == null) {
|
|
316
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
316
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsGet().');
|
|
317
317
|
}
|
|
318
|
-
if (requestParameters['
|
|
319
|
-
throw new runtime.RequiredError('
|
|
318
|
+
if (requestParameters['ragConfigName'] == null) {
|
|
319
|
+
throw new runtime.RequiredError('ragConfigName', 'Required parameter "ragConfigName" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsGet().');
|
|
320
320
|
}
|
|
321
321
|
const queryParameters = {};
|
|
322
322
|
if (requestParameters['status'] != null) {
|
|
@@ -330,9 +330,9 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
330
330
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
|
-
let urlPath = `/organizations/{organizationId}/rag/{
|
|
333
|
+
let urlPath = `/organizations/{organizationId}/rag/{ragConfigName}/documents`;
|
|
334
334
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
335
|
-
urlPath = urlPath.replace(`{${"
|
|
335
|
+
urlPath = urlPath.replace(`{${"ragConfigName"}}`, encodeURIComponent(String(requestParameters['ragConfigName'])));
|
|
336
336
|
const response = yield this.request({
|
|
337
337
|
path: urlPath,
|
|
338
338
|
method: 'GET',
|
|
@@ -345,25 +345,25 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
345
345
|
/**
|
|
346
346
|
* List documents in a RAG configuration
|
|
347
347
|
*/
|
|
348
|
-
|
|
348
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsGet(requestParameters, initOverrides) {
|
|
349
349
|
return __awaiter(this, void 0, void 0, function* () {
|
|
350
|
-
const response = yield this.
|
|
350
|
+
const response = yield this.organizationsOrganizationIdRagRagConfigNameDocumentsGetRaw(requestParameters, initOverrides);
|
|
351
351
|
return yield response.value();
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
354
|
/**
|
|
355
355
|
* Upload a document to a RAG configuration
|
|
356
356
|
*/
|
|
357
|
-
|
|
357
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsPostRaw(requestParameters, initOverrides) {
|
|
358
358
|
return __awaiter(this, void 0, void 0, function* () {
|
|
359
359
|
if (requestParameters['organizationId'] == null) {
|
|
360
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
360
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsPost().');
|
|
361
361
|
}
|
|
362
|
-
if (requestParameters['
|
|
363
|
-
throw new runtime.RequiredError('
|
|
362
|
+
if (requestParameters['ragConfigName'] == null) {
|
|
363
|
+
throw new runtime.RequiredError('ragConfigName', 'Required parameter "ragConfigName" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsPost().');
|
|
364
364
|
}
|
|
365
365
|
if (requestParameters['file'] == null) {
|
|
366
|
-
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling
|
|
366
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsPost().');
|
|
367
367
|
}
|
|
368
368
|
const queryParameters = {};
|
|
369
369
|
const headerParameters = {};
|
|
@@ -398,9 +398,9 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
398
398
|
if (requestParameters['metadata'] != null) {
|
|
399
399
|
formParams.append('metadata', requestParameters['metadata']);
|
|
400
400
|
}
|
|
401
|
-
let urlPath = `/organizations/{organizationId}/rag/{
|
|
401
|
+
let urlPath = `/organizations/{organizationId}/rag/{ragConfigName}/documents`;
|
|
402
402
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
403
|
-
urlPath = urlPath.replace(`{${"
|
|
403
|
+
urlPath = urlPath.replace(`{${"ragConfigName"}}`, encodeURIComponent(String(requestParameters['ragConfigName'])));
|
|
404
404
|
const response = yield this.request({
|
|
405
405
|
path: urlPath,
|
|
406
406
|
method: 'POST',
|
|
@@ -414,9 +414,9 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
414
414
|
/**
|
|
415
415
|
* Upload a document to a RAG configuration
|
|
416
416
|
*/
|
|
417
|
-
|
|
417
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsPost(requestParameters, initOverrides) {
|
|
418
418
|
return __awaiter(this, void 0, void 0, function* () {
|
|
419
|
-
const response = yield this.
|
|
419
|
+
const response = yield this.organizationsOrganizationIdRagRagConfigNameDocumentsPostRaw(requestParameters, initOverrides);
|
|
420
420
|
return yield response.value();
|
|
421
421
|
});
|
|
422
422
|
}
|
|
@@ -425,7 +425,7 @@ exports.RAGApi = RAGApi;
|
|
|
425
425
|
/**
|
|
426
426
|
* @export
|
|
427
427
|
*/
|
|
428
|
-
exports.
|
|
428
|
+
exports.OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum = {
|
|
429
429
|
Pending: 'pending',
|
|
430
430
|
Processing: 'processing',
|
|
431
431
|
Completed: 'completed',
|
package/dist/esm/api-client.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { InvitationsApi } from "./apis/InvitationsApi";
|
|
|
5
5
|
import { MembersApi } from "./apis/MembersApi";
|
|
6
6
|
import { OrganizationsApi } from "./apis/OrganizationsApi";
|
|
7
7
|
import { PlaygroundApi } from "./apis/PlaygroundApi";
|
|
8
|
-
import { RAGApi, type
|
|
8
|
+
import { RAGApi, type OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum } from "./apis/RAGApi";
|
|
9
9
|
import { RecordingsApi } from "./apis/RecordingsApi";
|
|
10
10
|
import { SIPApi } from "./apis/SIPApi";
|
|
11
11
|
import { EmbeddingProvidersApi } from "./apis/EmbeddingProvidersApi";
|
|
@@ -71,13 +71,13 @@ export declare class Api {
|
|
|
71
71
|
readonly rag: {
|
|
72
72
|
list: (organizationId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagGet"]>;
|
|
73
73
|
create: (organizationId: string, ragConfigCreate: RagConfigCreate, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagPost"]>;
|
|
74
|
-
delete: (organizationId: string,
|
|
74
|
+
delete: (organizationId: string, ragConfigName: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDelete"]>;
|
|
75
75
|
documents: {
|
|
76
|
-
upload: (organizationId: string,
|
|
77
|
-
list: (organizationId: string,
|
|
78
|
-
get: (organizationId: string,
|
|
79
|
-
replace: (organizationId: string,
|
|
80
|
-
delete: (organizationId: string,
|
|
76
|
+
upload: (organizationId: string, ragConfigName: string, file: File, sourceUrl?: string, metadata?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsPost"]>;
|
|
77
|
+
list: (organizationId: string, ragConfigName: string, status?: OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsGet"]>;
|
|
78
|
+
get: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet"]>;
|
|
79
|
+
replace: (organizationId: string, ragConfigName: string, documentId: string, file: File, sourceUrl?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut"]>;
|
|
80
|
+
delete: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete"]>;
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
83
|
readonly sip: {
|
package/dist/esm/api-client.js
CHANGED
|
@@ -98,13 +98,13 @@ export class Api {
|
|
|
98
98
|
this.rag = {
|
|
99
99
|
list: (organizationId, options) => this.ragApi.organizationsOrganizationIdRagGet({ organizationId }, options),
|
|
100
100
|
create: (organizationId, ragConfigCreate, options) => this.ragApi.organizationsOrganizationIdRagPost({ organizationId, ragConfigCreate }, options),
|
|
101
|
-
delete: (organizationId,
|
|
101
|
+
delete: (organizationId, ragConfigName, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDelete({ organizationId, ragConfigName }, options),
|
|
102
102
|
documents: {
|
|
103
|
-
upload: (organizationId,
|
|
104
|
-
list: (organizationId,
|
|
105
|
-
get: (organizationId,
|
|
106
|
-
replace: (organizationId,
|
|
107
|
-
delete: (organizationId,
|
|
103
|
+
upload: (organizationId, ragConfigName, file, sourceUrl, metadata, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsPost({ organizationId, ragConfigName, file, sourceUrl, metadata }, options),
|
|
104
|
+
list: (organizationId, ragConfigName, status, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsGet({ organizationId, ragConfigName, status }, options),
|
|
105
|
+
get: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet({ organizationId, ragConfigName, documentId }, options),
|
|
106
|
+
replace: (organizationId, ragConfigName, documentId, file, sourceUrl, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut({ organizationId, ragConfigName, documentId, file, sourceUrl }, options),
|
|
107
|
+
delete: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete({ organizationId, ragConfigName, documentId }, options),
|
|
108
108
|
},
|
|
109
109
|
};
|
|
110
110
|
this.sip = {
|