@openfilz-sdk/typescript 1.2.19 → 1.2.21
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/.openapi-generator/FILES +16 -0
- package/.openapi-generator/openfilz-api-generate-typescript-sdk.sha256 +1 -1
- package/README.md +17 -3
- package/api/aichat-api.ts +341 -0
- package/api/aisettings-api.ts +335 -0
- package/api/settings-api.ts +8 -8
- package/api.ts +2 -0
- package/dist/api/aichat-api.d.ts +161 -0
- package/dist/api/aichat-api.js +332 -0
- package/dist/api/aisettings-api.d.ts +157 -0
- package/dist/api/aisettings-api.js +326 -0
- package/dist/api/settings-api.d.ts +4 -4
- package/dist/api/settings-api.js +8 -8
- package/dist/api.d.ts +2 -0
- package/dist/api.js +2 -0
- package/dist/esm/api/aichat-api.d.ts +161 -0
- package/dist/esm/api/aichat-api.js +325 -0
- package/dist/esm/api/aisettings-api.d.ts +157 -0
- package/dist/esm/api/aisettings-api.js +319 -0
- package/dist/esm/api/settings-api.d.ts +4 -4
- package/dist/esm/api/settings-api.js +8 -8
- package/dist/esm/api.d.ts +2 -0
- package/dist/esm/api.js +2 -0
- package/dist/esm/models/ai-chat-conversation.d.ts +18 -0
- package/dist/esm/models/ai-chat-conversation.js +14 -0
- package/dist/esm/models/ai-chat-request.d.ts +15 -0
- package/dist/esm/models/ai-chat-request.js +14 -0
- package/dist/esm/models/ai-chat-response.d.ts +23 -0
- package/dist/esm/models/ai-chat-response.js +18 -0
- package/dist/esm/models/ai-connection-test-result.d.ts +16 -0
- package/dist/esm/models/ai-connection-test-result.js +14 -0
- package/dist/esm/models/ai-settings-response.d.ts +21 -0
- package/dist/esm/models/ai-settings-response.js +14 -0
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -0
- package/dist/esm/models/save-ai-settings-request.d.ts +36 -0
- package/dist/esm/models/save-ai-settings-request.js +19 -0
- package/dist/esm/models/settings.d.ts +1 -0
- package/dist/models/ai-chat-conversation.d.ts +18 -0
- package/dist/models/ai-chat-conversation.js +15 -0
- package/dist/models/ai-chat-request.d.ts +15 -0
- package/dist/models/ai-chat-request.js +15 -0
- package/dist/models/ai-chat-response.d.ts +23 -0
- package/dist/models/ai-chat-response.js +21 -0
- package/dist/models/ai-connection-test-result.d.ts +16 -0
- package/dist/models/ai-connection-test-result.js +15 -0
- package/dist/models/ai-settings-response.d.ts +21 -0
- package/dist/models/ai-settings-response.js +15 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/dist/models/save-ai-settings-request.d.ts +36 -0
- package/dist/models/save-ai-settings-request.js +22 -0
- package/dist/models/settings.d.ts +1 -0
- package/docs/AIChatApi.md +209 -0
- package/docs/AISettingsApi.md +203 -0
- package/docs/AiChatConversation.md +28 -0
- package/docs/AiChatRequest.md +22 -0
- package/docs/AiChatResponse.md +26 -0
- package/docs/AiConnectionTestResult.md +24 -0
- package/docs/AiSettingsResponse.md +34 -0
- package/docs/SaveAiSettingsRequest.md +26 -0
- package/docs/Settings.md +2 -0
- package/docs/SettingsApi.md +4 -4
- package/models/ai-chat-conversation.ts +24 -0
- package/models/ai-chat-request.ts +21 -0
- package/models/ai-chat-response.ts +32 -0
- package/models/ai-connection-test-result.ts +22 -0
- package/models/ai-settings-response.ts +27 -0
- package/models/index.ts +6 -0
- package/models/save-ai-settings-request.ts +45 -0
- package/models/settings.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* openfilz-api
|
|
5
|
+
* API for Document Management System
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import type { Configuration } from '../configuration';
|
|
17
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
18
|
+
import globalAxios from 'axios';
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
import type { AiConnectionTestResult } from '../models';
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import type { AiSettingsResponse } from '../models';
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
import type { SaveAiSettingsRequest } from '../models';
|
|
30
|
+
/**
|
|
31
|
+
* AISettingsApi - axios parameter creator
|
|
32
|
+
*/
|
|
33
|
+
export const AISettingsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
34
|
+
return {
|
|
35
|
+
/**
|
|
36
|
+
* Remove my chat-LLM override and go back to the server default model.
|
|
37
|
+
* @summary Reset my AI settings
|
|
38
|
+
* @param {*} [options] Override http request option.
|
|
39
|
+
* @throws {RequiredError}
|
|
40
|
+
*/
|
|
41
|
+
deleteSettings: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
42
|
+
const localVarPath = `/api/v1/settings/ai`;
|
|
43
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
45
|
+
let baseOptions;
|
|
46
|
+
if (configuration) {
|
|
47
|
+
baseOptions = configuration.baseOptions;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
51
|
+
const localVarHeaderParameter = {} as any;
|
|
52
|
+
const localVarQueryParameter = {} as any;
|
|
53
|
+
|
|
54
|
+
// authentication keycloak_auth required
|
|
55
|
+
// http bearer authentication required
|
|
56
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
60
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
61
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
url: toPathString(localVarUrlObj),
|
|
65
|
+
options: localVarRequestOptions,
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
/**
|
|
69
|
+
* Current user\'s chat-LLM override. The API key is never returned — only hasApiKey and its last characters.
|
|
70
|
+
* @summary Get my AI settings
|
|
71
|
+
* @param {*} [options] Override http request option.
|
|
72
|
+
* @throws {RequiredError}
|
|
73
|
+
*/
|
|
74
|
+
getSettings: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
75
|
+
const localVarPath = `/api/v1/settings/ai`;
|
|
76
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
77
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
78
|
+
let baseOptions;
|
|
79
|
+
if (configuration) {
|
|
80
|
+
baseOptions = configuration.baseOptions;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
84
|
+
const localVarHeaderParameter = {} as any;
|
|
85
|
+
const localVarQueryParameter = {} as any;
|
|
86
|
+
|
|
87
|
+
// authentication keycloak_auth required
|
|
88
|
+
// http bearer authentication required
|
|
89
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
90
|
+
|
|
91
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
92
|
+
|
|
93
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
94
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
95
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
url: toPathString(localVarUrlObj),
|
|
99
|
+
options: localVarRequestOptions,
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
/**
|
|
103
|
+
* Set the chat LLM to use for my conversations. Omit apiKey to keep the previously stored key.
|
|
104
|
+
* @summary Save my AI settings
|
|
105
|
+
* @param {SaveAiSettingsRequest} saveAiSettingsRequest
|
|
106
|
+
* @param {*} [options] Override http request option.
|
|
107
|
+
* @throws {RequiredError}
|
|
108
|
+
*/
|
|
109
|
+
saveSettings: async (saveAiSettingsRequest: SaveAiSettingsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
110
|
+
// verify required parameter 'saveAiSettingsRequest' is not null or undefined
|
|
111
|
+
assertParamExists('saveSettings', 'saveAiSettingsRequest', saveAiSettingsRequest)
|
|
112
|
+
const localVarPath = `/api/v1/settings/ai`;
|
|
113
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
114
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
115
|
+
let baseOptions;
|
|
116
|
+
if (configuration) {
|
|
117
|
+
baseOptions = configuration.baseOptions;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
121
|
+
const localVarHeaderParameter = {} as any;
|
|
122
|
+
const localVarQueryParameter = {} as any;
|
|
123
|
+
|
|
124
|
+
// authentication keycloak_auth required
|
|
125
|
+
// http bearer authentication required
|
|
126
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
127
|
+
|
|
128
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
129
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
130
|
+
|
|
131
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
132
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
133
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
134
|
+
localVarRequestOptions.data = serializeDataIfNeeded(saveAiSettingsRequest, localVarRequestOptions, configuration)
|
|
135
|
+
|
|
136
|
+
return {
|
|
137
|
+
url: toPathString(localVarUrlObj),
|
|
138
|
+
options: localVarRequestOptions,
|
|
139
|
+
};
|
|
140
|
+
},
|
|
141
|
+
/**
|
|
142
|
+
* Send a minimal completion request with the submitted settings (falls back to the stored key when apiKey is omitted).
|
|
143
|
+
* @summary Test AI provider connection
|
|
144
|
+
* @param {SaveAiSettingsRequest} saveAiSettingsRequest
|
|
145
|
+
* @param {*} [options] Override http request option.
|
|
146
|
+
* @throws {RequiredError}
|
|
147
|
+
*/
|
|
148
|
+
testConnection: async (saveAiSettingsRequest: SaveAiSettingsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
149
|
+
// verify required parameter 'saveAiSettingsRequest' is not null or undefined
|
|
150
|
+
assertParamExists('testConnection', 'saveAiSettingsRequest', saveAiSettingsRequest)
|
|
151
|
+
const localVarPath = `/api/v1/settings/ai/test`;
|
|
152
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
153
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
154
|
+
let baseOptions;
|
|
155
|
+
if (configuration) {
|
|
156
|
+
baseOptions = configuration.baseOptions;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
160
|
+
const localVarHeaderParameter = {} as any;
|
|
161
|
+
const localVarQueryParameter = {} as any;
|
|
162
|
+
|
|
163
|
+
// authentication keycloak_auth required
|
|
164
|
+
// http bearer authentication required
|
|
165
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
166
|
+
|
|
167
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
168
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
169
|
+
|
|
170
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
171
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
172
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
173
|
+
localVarRequestOptions.data = serializeDataIfNeeded(saveAiSettingsRequest, localVarRequestOptions, configuration)
|
|
174
|
+
|
|
175
|
+
return {
|
|
176
|
+
url: toPathString(localVarUrlObj),
|
|
177
|
+
options: localVarRequestOptions,
|
|
178
|
+
};
|
|
179
|
+
},
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* AISettingsApi - functional programming interface
|
|
185
|
+
*/
|
|
186
|
+
export const AISettingsApiFp = function(configuration?: Configuration) {
|
|
187
|
+
const localVarAxiosParamCreator = AISettingsApiAxiosParamCreator(configuration)
|
|
188
|
+
return {
|
|
189
|
+
/**
|
|
190
|
+
* Remove my chat-LLM override and go back to the server default model.
|
|
191
|
+
* @summary Reset my AI settings
|
|
192
|
+
* @param {*} [options] Override http request option.
|
|
193
|
+
* @throws {RequiredError}
|
|
194
|
+
*/
|
|
195
|
+
async deleteSettings(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
196
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSettings(options);
|
|
197
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
198
|
+
const localVarOperationServerBasePath = operationServerMap['AISettingsApi.deleteSettings']?.[localVarOperationServerIndex]?.url;
|
|
199
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
200
|
+
},
|
|
201
|
+
/**
|
|
202
|
+
* Current user\'s chat-LLM override. The API key is never returned — only hasApiKey and its last characters.
|
|
203
|
+
* @summary Get my AI settings
|
|
204
|
+
* @param {*} [options] Override http request option.
|
|
205
|
+
* @throws {RequiredError}
|
|
206
|
+
*/
|
|
207
|
+
async getSettings(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiSettingsResponse>> {
|
|
208
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getSettings(options);
|
|
209
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
210
|
+
const localVarOperationServerBasePath = operationServerMap['AISettingsApi.getSettings']?.[localVarOperationServerIndex]?.url;
|
|
211
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
212
|
+
},
|
|
213
|
+
/**
|
|
214
|
+
* Set the chat LLM to use for my conversations. Omit apiKey to keep the previously stored key.
|
|
215
|
+
* @summary Save my AI settings
|
|
216
|
+
* @param {SaveAiSettingsRequest} saveAiSettingsRequest
|
|
217
|
+
* @param {*} [options] Override http request option.
|
|
218
|
+
* @throws {RequiredError}
|
|
219
|
+
*/
|
|
220
|
+
async saveSettings(saveAiSettingsRequest: SaveAiSettingsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiSettingsResponse>> {
|
|
221
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.saveSettings(saveAiSettingsRequest, options);
|
|
222
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
223
|
+
const localVarOperationServerBasePath = operationServerMap['AISettingsApi.saveSettings']?.[localVarOperationServerIndex]?.url;
|
|
224
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
225
|
+
},
|
|
226
|
+
/**
|
|
227
|
+
* Send a minimal completion request with the submitted settings (falls back to the stored key when apiKey is omitted).
|
|
228
|
+
* @summary Test AI provider connection
|
|
229
|
+
* @param {SaveAiSettingsRequest} saveAiSettingsRequest
|
|
230
|
+
* @param {*} [options] Override http request option.
|
|
231
|
+
* @throws {RequiredError}
|
|
232
|
+
*/
|
|
233
|
+
async testConnection(saveAiSettingsRequest: SaveAiSettingsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiConnectionTestResult>> {
|
|
234
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.testConnection(saveAiSettingsRequest, options);
|
|
235
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
236
|
+
const localVarOperationServerBasePath = operationServerMap['AISettingsApi.testConnection']?.[localVarOperationServerIndex]?.url;
|
|
237
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
238
|
+
},
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* AISettingsApi - factory interface
|
|
244
|
+
*/
|
|
245
|
+
export const AISettingsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
246
|
+
const localVarFp = AISettingsApiFp(configuration)
|
|
247
|
+
return {
|
|
248
|
+
/**
|
|
249
|
+
* Remove my chat-LLM override and go back to the server default model.
|
|
250
|
+
* @summary Reset my AI settings
|
|
251
|
+
* @param {*} [options] Override http request option.
|
|
252
|
+
* @throws {RequiredError}
|
|
253
|
+
*/
|
|
254
|
+
deleteSettings(options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
255
|
+
return localVarFp.deleteSettings(options).then((request) => request(axios, basePath));
|
|
256
|
+
},
|
|
257
|
+
/**
|
|
258
|
+
* Current user\'s chat-LLM override. The API key is never returned — only hasApiKey and its last characters.
|
|
259
|
+
* @summary Get my AI settings
|
|
260
|
+
* @param {*} [options] Override http request option.
|
|
261
|
+
* @throws {RequiredError}
|
|
262
|
+
*/
|
|
263
|
+
getSettings(options?: RawAxiosRequestConfig): AxiosPromise<AiSettingsResponse> {
|
|
264
|
+
return localVarFp.getSettings(options).then((request) => request(axios, basePath));
|
|
265
|
+
},
|
|
266
|
+
/**
|
|
267
|
+
* Set the chat LLM to use for my conversations. Omit apiKey to keep the previously stored key.
|
|
268
|
+
* @summary Save my AI settings
|
|
269
|
+
* @param {SaveAiSettingsRequest} saveAiSettingsRequest
|
|
270
|
+
* @param {*} [options] Override http request option.
|
|
271
|
+
* @throws {RequiredError}
|
|
272
|
+
*/
|
|
273
|
+
saveSettings(saveAiSettingsRequest: SaveAiSettingsRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiSettingsResponse> {
|
|
274
|
+
return localVarFp.saveSettings(saveAiSettingsRequest, options).then((request) => request(axios, basePath));
|
|
275
|
+
},
|
|
276
|
+
/**
|
|
277
|
+
* Send a minimal completion request with the submitted settings (falls back to the stored key when apiKey is omitted).
|
|
278
|
+
* @summary Test AI provider connection
|
|
279
|
+
* @param {SaveAiSettingsRequest} saveAiSettingsRequest
|
|
280
|
+
* @param {*} [options] Override http request option.
|
|
281
|
+
* @throws {RequiredError}
|
|
282
|
+
*/
|
|
283
|
+
testConnection(saveAiSettingsRequest: SaveAiSettingsRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiConnectionTestResult> {
|
|
284
|
+
return localVarFp.testConnection(saveAiSettingsRequest, options).then((request) => request(axios, basePath));
|
|
285
|
+
},
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* AISettingsApi - object-oriented interface
|
|
291
|
+
*/
|
|
292
|
+
export class AISettingsApi extends BaseAPI {
|
|
293
|
+
/**
|
|
294
|
+
* Remove my chat-LLM override and go back to the server default model.
|
|
295
|
+
* @summary Reset my AI settings
|
|
296
|
+
* @param {*} [options] Override http request option.
|
|
297
|
+
* @throws {RequiredError}
|
|
298
|
+
*/
|
|
299
|
+
public deleteSettings(options?: RawAxiosRequestConfig) {
|
|
300
|
+
return AISettingsApiFp(this.configuration).deleteSettings(options).then((request) => request(this.axios, this.basePath));
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Current user\'s chat-LLM override. The API key is never returned — only hasApiKey and its last characters.
|
|
305
|
+
* @summary Get my AI settings
|
|
306
|
+
* @param {*} [options] Override http request option.
|
|
307
|
+
* @throws {RequiredError}
|
|
308
|
+
*/
|
|
309
|
+
public getSettings(options?: RawAxiosRequestConfig) {
|
|
310
|
+
return AISettingsApiFp(this.configuration).getSettings(options).then((request) => request(this.axios, this.basePath));
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Set the chat LLM to use for my conversations. Omit apiKey to keep the previously stored key.
|
|
315
|
+
* @summary Save my AI settings
|
|
316
|
+
* @param {SaveAiSettingsRequest} saveAiSettingsRequest
|
|
317
|
+
* @param {*} [options] Override http request option.
|
|
318
|
+
* @throws {RequiredError}
|
|
319
|
+
*/
|
|
320
|
+
public saveSettings(saveAiSettingsRequest: SaveAiSettingsRequest, options?: RawAxiosRequestConfig) {
|
|
321
|
+
return AISettingsApiFp(this.configuration).saveSettings(saveAiSettingsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Send a minimal completion request with the submitted settings (falls back to the stored key when apiKey is omitted).
|
|
326
|
+
* @summary Test AI provider connection
|
|
327
|
+
* @param {SaveAiSettingsRequest} saveAiSettingsRequest
|
|
328
|
+
* @param {*} [options] Override http request option.
|
|
329
|
+
* @throws {RequiredError}
|
|
330
|
+
*/
|
|
331
|
+
public testConnection(saveAiSettingsRequest: SaveAiSettingsRequest, options?: RawAxiosRequestConfig) {
|
|
332
|
+
return AISettingsApiFp(this.configuration).testConnection(saveAiSettingsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
package/api/settings-api.ts
CHANGED
|
@@ -34,7 +34,7 @@ export const SettingsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
34
34
|
* @param {*} [options] Override http request option.
|
|
35
35
|
* @throws {RequiredError}
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
getSettings1: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
38
38
|
const localVarPath = `/api/v1/settings`;
|
|
39
39
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
40
40
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -77,10 +77,10 @@ export const SettingsApiFp = function(configuration?: Configuration) {
|
|
|
77
77
|
* @param {*} [options] Override http request option.
|
|
78
78
|
* @throws {RequiredError}
|
|
79
79
|
*/
|
|
80
|
-
async
|
|
81
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
80
|
+
async getSettings1(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Settings>> {
|
|
81
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getSettings1(options);
|
|
82
82
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
83
|
-
const localVarOperationServerBasePath = operationServerMap['SettingsApi.
|
|
83
|
+
const localVarOperationServerBasePath = operationServerMap['SettingsApi.getSettings1']?.[localVarOperationServerIndex]?.url;
|
|
84
84
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
85
85
|
},
|
|
86
86
|
}
|
|
@@ -98,8 +98,8 @@ export const SettingsApiFactory = function (configuration?: Configuration, baseP
|
|
|
98
98
|
* @param {*} [options] Override http request option.
|
|
99
99
|
* @throws {RequiredError}
|
|
100
100
|
*/
|
|
101
|
-
|
|
102
|
-
return localVarFp.
|
|
101
|
+
getSettings1(options?: RawAxiosRequestConfig): AxiosPromise<Settings> {
|
|
102
|
+
return localVarFp.getSettings1(options).then((request) => request(axios, basePath));
|
|
103
103
|
},
|
|
104
104
|
};
|
|
105
105
|
};
|
|
@@ -114,8 +114,8 @@ export class SettingsApi extends BaseAPI {
|
|
|
114
114
|
* @param {*} [options] Override http request option.
|
|
115
115
|
* @throws {RequiredError}
|
|
116
116
|
*/
|
|
117
|
-
public
|
|
118
|
-
return SettingsApiFp(this.configuration).
|
|
117
|
+
public getSettings1(options?: RawAxiosRequestConfig) {
|
|
118
|
+
return SettingsApiFp(this.configuration).getSettings1(options).then((request) => request(this.axios, this.basePath));
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
package/api.ts
CHANGED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* openfilz-api
|
|
3
|
+
* API for Document Management System
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
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 { Configuration } from '../configuration';
|
|
13
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
import { type RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import type { AiChatConversation } from '../models';
|
|
16
|
+
import type { AiChatRequest } from '../models';
|
|
17
|
+
import type { AiChatResponse } from '../models';
|
|
18
|
+
/**
|
|
19
|
+
* AIChatApi - axios parameter creator
|
|
20
|
+
*/
|
|
21
|
+
export declare const AIChatApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
22
|
+
/**
|
|
23
|
+
* Send a message and receive a streaming response. The AI can answer questions about documents, search, summarize, and reorganize files.
|
|
24
|
+
* @summary Chat with AI assistant
|
|
25
|
+
* @param {AiChatRequest} aiChatRequest
|
|
26
|
+
* @param {*} [options] Override http request option.
|
|
27
|
+
* @throws {RequiredError}
|
|
28
|
+
*/
|
|
29
|
+
chat: (aiChatRequest: AiChatRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
30
|
+
/**
|
|
31
|
+
* Delete a conversation and all its messages
|
|
32
|
+
* @summary Delete conversation
|
|
33
|
+
* @param {string} conversationId
|
|
34
|
+
* @param {*} [options] Override http request option.
|
|
35
|
+
* @throws {RequiredError}
|
|
36
|
+
*/
|
|
37
|
+
deleteConversation: (conversationId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
38
|
+
/**
|
|
39
|
+
* Get all messages in a conversation
|
|
40
|
+
* @summary Get conversation history
|
|
41
|
+
* @param {string} conversationId
|
|
42
|
+
* @param {*} [options] Override http request option.
|
|
43
|
+
* @throws {RequiredError}
|
|
44
|
+
*/
|
|
45
|
+
getConversationHistory: (conversationId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
46
|
+
/**
|
|
47
|
+
* Get all AI chat conversations for the current user
|
|
48
|
+
* @summary List conversations
|
|
49
|
+
* @param {*} [options] Override http request option.
|
|
50
|
+
* @throws {RequiredError}
|
|
51
|
+
*/
|
|
52
|
+
listConversations: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* AIChatApi - functional programming interface
|
|
56
|
+
*/
|
|
57
|
+
export declare const AIChatApiFp: (configuration?: Configuration) => {
|
|
58
|
+
/**
|
|
59
|
+
* Send a message and receive a streaming response. The AI can answer questions about documents, search, summarize, and reorganize files.
|
|
60
|
+
* @summary Chat with AI assistant
|
|
61
|
+
* @param {AiChatRequest} aiChatRequest
|
|
62
|
+
* @param {*} [options] Override http request option.
|
|
63
|
+
* @throws {RequiredError}
|
|
64
|
+
*/
|
|
65
|
+
chat(aiChatRequest: AiChatRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AiChatResponse>>>;
|
|
66
|
+
/**
|
|
67
|
+
* Delete a conversation and all its messages
|
|
68
|
+
* @summary Delete conversation
|
|
69
|
+
* @param {string} conversationId
|
|
70
|
+
* @param {*} [options] Override http request option.
|
|
71
|
+
* @throws {RequiredError}
|
|
72
|
+
*/
|
|
73
|
+
deleteConversation(conversationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
74
|
+
/**
|
|
75
|
+
* Get all messages in a conversation
|
|
76
|
+
* @summary Get conversation history
|
|
77
|
+
* @param {string} conversationId
|
|
78
|
+
* @param {*} [options] Override http request option.
|
|
79
|
+
* @throws {RequiredError}
|
|
80
|
+
*/
|
|
81
|
+
getConversationHistory(conversationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AiChatResponse>>>;
|
|
82
|
+
/**
|
|
83
|
+
* Get all AI chat conversations for the current user
|
|
84
|
+
* @summary List conversations
|
|
85
|
+
* @param {*} [options] Override http request option.
|
|
86
|
+
* @throws {RequiredError}
|
|
87
|
+
*/
|
|
88
|
+
listConversations(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AiChatConversation>>>;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* AIChatApi - factory interface
|
|
92
|
+
*/
|
|
93
|
+
export declare const AIChatApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
94
|
+
/**
|
|
95
|
+
* Send a message and receive a streaming response. The AI can answer questions about documents, search, summarize, and reorganize files.
|
|
96
|
+
* @summary Chat with AI assistant
|
|
97
|
+
* @param {AiChatRequest} aiChatRequest
|
|
98
|
+
* @param {*} [options] Override http request option.
|
|
99
|
+
* @throws {RequiredError}
|
|
100
|
+
*/
|
|
101
|
+
chat(aiChatRequest: AiChatRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<AiChatResponse>>;
|
|
102
|
+
/**
|
|
103
|
+
* Delete a conversation and all its messages
|
|
104
|
+
* @summary Delete conversation
|
|
105
|
+
* @param {string} conversationId
|
|
106
|
+
* @param {*} [options] Override http request option.
|
|
107
|
+
* @throws {RequiredError}
|
|
108
|
+
*/
|
|
109
|
+
deleteConversation(conversationId: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* Get all messages in a conversation
|
|
112
|
+
* @summary Get conversation history
|
|
113
|
+
* @param {string} conversationId
|
|
114
|
+
* @param {*} [options] Override http request option.
|
|
115
|
+
* @throws {RequiredError}
|
|
116
|
+
*/
|
|
117
|
+
getConversationHistory(conversationId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<AiChatResponse>>;
|
|
118
|
+
/**
|
|
119
|
+
* Get all AI chat conversations for the current user
|
|
120
|
+
* @summary List conversations
|
|
121
|
+
* @param {*} [options] Override http request option.
|
|
122
|
+
* @throws {RequiredError}
|
|
123
|
+
*/
|
|
124
|
+
listConversations(options?: RawAxiosRequestConfig): AxiosPromise<Array<AiChatConversation>>;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* AIChatApi - object-oriented interface
|
|
128
|
+
*/
|
|
129
|
+
export declare class AIChatApi extends BaseAPI {
|
|
130
|
+
/**
|
|
131
|
+
* Send a message and receive a streaming response. The AI can answer questions about documents, search, summarize, and reorganize files.
|
|
132
|
+
* @summary Chat with AI assistant
|
|
133
|
+
* @param {AiChatRequest} aiChatRequest
|
|
134
|
+
* @param {*} [options] Override http request option.
|
|
135
|
+
* @throws {RequiredError}
|
|
136
|
+
*/
|
|
137
|
+
chat(aiChatRequest: AiChatRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AiChatResponse[], any, {}>>;
|
|
138
|
+
/**
|
|
139
|
+
* Delete a conversation and all its messages
|
|
140
|
+
* @summary Delete conversation
|
|
141
|
+
* @param {string} conversationId
|
|
142
|
+
* @param {*} [options] Override http request option.
|
|
143
|
+
* @throws {RequiredError}
|
|
144
|
+
*/
|
|
145
|
+
deleteConversation(conversationId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
146
|
+
/**
|
|
147
|
+
* Get all messages in a conversation
|
|
148
|
+
* @summary Get conversation history
|
|
149
|
+
* @param {string} conversationId
|
|
150
|
+
* @param {*} [options] Override http request option.
|
|
151
|
+
* @throws {RequiredError}
|
|
152
|
+
*/
|
|
153
|
+
getConversationHistory(conversationId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AiChatResponse[], any, {}>>;
|
|
154
|
+
/**
|
|
155
|
+
* Get all AI chat conversations for the current user
|
|
156
|
+
* @summary List conversations
|
|
157
|
+
* @param {*} [options] Override http request option.
|
|
158
|
+
* @throws {RequiredError}
|
|
159
|
+
*/
|
|
160
|
+
listConversations(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AiChatConversation[], any, {}>>;
|
|
161
|
+
}
|