This commit is contained in:
parent
1d1cb1120f
commit
1b3d0f9b50
@ -125,6 +125,8 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
path:
|
path:
|
||||||
type: string
|
type: string
|
||||||
|
size:
|
||||||
|
type: integer
|
||||||
updated_at:
|
updated_at:
|
||||||
type: string
|
type: string
|
||||||
url:
|
url:
|
||||||
@ -1284,11 +1286,11 @@ paths:
|
|||||||
summary: 清空聊天记录
|
summary: 清空聊天记录
|
||||||
tags:
|
tags:
|
||||||
- chat_message
|
- chat_message
|
||||||
/api/v1/chats/{id}/images:
|
/api/v1/chats/{id}/files:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
description: 将一个图片添加到聊天记录中
|
description: 将一个文件添加到聊天记录中
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: id
|
name: id
|
||||||
@ -1298,9 +1300,9 @@ paths:
|
|||||||
name: url
|
name: url
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- description: 图片
|
- description: 文件
|
||||||
in: formData
|
in: formData
|
||||||
name: image
|
name: file
|
||||||
type: file
|
type: file
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
@ -1337,7 +1339,7 @@ paths:
|
|||||||
$ref: '#/definitions/schema.ResponseBody'
|
$ref: '#/definitions/schema.ResponseBody'
|
||||||
security:
|
security:
|
||||||
- ApiKeyAuth: []
|
- ApiKeyAuth: []
|
||||||
summary: 添加图片
|
summary: 添加文件
|
||||||
tags:
|
tags:
|
||||||
- chat_message
|
- chat_message
|
||||||
/api/v1/chats/{id}/messages:
|
/api/v1/chats/{id}/messages:
|
||||||
@ -1454,6 +1456,54 @@ paths:
|
|||||||
summary: 下载文件
|
summary: 下载文件
|
||||||
tags:
|
tags:
|
||||||
- file
|
- file
|
||||||
|
/api/v1/libraries:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/schema.ResponseBody'
|
||||||
|
- properties:
|
||||||
|
data:
|
||||||
|
$ref: '#/definitions/entity.Memory'
|
||||||
|
type: object
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/schema.ResponseBody'
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: 获取所有的资料库
|
||||||
|
tags:
|
||||||
|
- libraries
|
||||||
|
/api/v1/libraries/{id}:
|
||||||
|
delete:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: No Content
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/schema.ResponseBody'
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: 删除资料库
|
||||||
|
tags:
|
||||||
|
- memoires
|
||||||
/api/v1/memories:
|
/api/v1/memories:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
|
260
src/api/api.ts
260
src/api/api.ts
@ -367,50 +367,50 @@ export interface ApiV1ChatPublicPost200Response {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
* @interface ApiV1ChatsIdImagesPostRequest
|
* @interface ApiV1ChatsIdFilesPostRequest
|
||||||
*/
|
*/
|
||||||
export interface ApiV1ChatsIdImagesPostRequest {
|
export interface ApiV1ChatsIdFilesPostRequest {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {string}
|
* @type {string}
|
||||||
* @memberof ApiV1ChatsIdImagesPostRequest
|
* @memberof ApiV1ChatsIdFilesPostRequest
|
||||||
*/
|
*/
|
||||||
'url': string;
|
'url': string;
|
||||||
/**
|
/**
|
||||||
* 图片
|
* 文件
|
||||||
* @type {File}
|
* @type {File}
|
||||||
* @memberof ApiV1ChatsIdImagesPostRequest
|
* @memberof ApiV1ChatsIdFilesPostRequest
|
||||||
*/
|
*/
|
||||||
'image'?: File;
|
'file'?: File;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
* @interface ApiV1MemoriesGet200Response
|
* @interface ApiV1LibrariesGet200Response
|
||||||
*/
|
*/
|
||||||
export interface ApiV1MemoriesGet200Response {
|
export interface ApiV1LibrariesGet200Response {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {EntityMemory}
|
* @type {EntityMemory}
|
||||||
* @memberof ApiV1MemoriesGet200Response
|
* @memberof ApiV1LibrariesGet200Response
|
||||||
*/
|
*/
|
||||||
'data'?: EntityMemory;
|
'data'?: EntityMemory;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {string}
|
* @type {string}
|
||||||
* @memberof ApiV1MemoriesGet200Response
|
* @memberof ApiV1LibrariesGet200Response
|
||||||
*/
|
*/
|
||||||
'error'?: string;
|
'error'?: string;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {string}
|
* @type {string}
|
||||||
* @memberof ApiV1MemoriesGet200Response
|
* @memberof ApiV1LibrariesGet200Response
|
||||||
*/
|
*/
|
||||||
'message'?: string;
|
'message'?: string;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
* @memberof ApiV1MemoriesGet200Response
|
* @memberof ApiV1LibrariesGet200Response
|
||||||
*/
|
*/
|
||||||
'success'?: boolean;
|
'success'?: boolean;
|
||||||
}
|
}
|
||||||
@ -848,6 +848,12 @@ export interface EntityFile {
|
|||||||
* @memberof EntityFile
|
* @memberof EntityFile
|
||||||
*/
|
*/
|
||||||
'path'?: string;
|
'path'?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof EntityFile
|
||||||
|
*/
|
||||||
|
'size'?: number;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {string}
|
* @type {string}
|
||||||
@ -2914,19 +2920,19 @@ export const ChatMessageApiAxiosParamCreator = function (configuration?: Configu
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 将一个图片添加到聊天记录中
|
* 将一个文件添加到聊天记录中
|
||||||
* @summary 添加图片
|
* @summary 添加文件
|
||||||
* @param {number} id
|
* @param {number} id
|
||||||
* @param {ApiV1ChatsIdImagesPostRequest} apiV1ChatsIdImagesPostRequest
|
* @param {ApiV1ChatsIdFilesPostRequest} apiV1ChatsIdFilesPostRequest
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
apiV1ChatsIdImagesPost: async (id: number, apiV1ChatsIdImagesPostRequest: ApiV1ChatsIdImagesPostRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
apiV1ChatsIdFilesPost: async (id: number, apiV1ChatsIdFilesPostRequest: ApiV1ChatsIdFilesPostRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'id' is not null or undefined
|
// verify required parameter 'id' is not null or undefined
|
||||||
assertParamExists('apiV1ChatsIdImagesPost', 'id', id)
|
assertParamExists('apiV1ChatsIdFilesPost', 'id', id)
|
||||||
// verify required parameter 'apiV1ChatsIdImagesPostRequest' is not null or undefined
|
// verify required parameter 'apiV1ChatsIdFilesPostRequest' is not null or undefined
|
||||||
assertParamExists('apiV1ChatsIdImagesPost', 'apiV1ChatsIdImagesPostRequest', apiV1ChatsIdImagesPostRequest)
|
assertParamExists('apiV1ChatsIdFilesPost', 'apiV1ChatsIdFilesPostRequest', apiV1ChatsIdFilesPostRequest)
|
||||||
const localVarPath = `/api/v1/chats/{id}/images`
|
const localVarPath = `/api/v1/chats/{id}/files`
|
||||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
@ -2949,7 +2955,7 @@ export const ChatMessageApiAxiosParamCreator = function (configuration?: Configu
|
|||||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
localVarRequestOptions.data = serializeDataIfNeeded(apiV1ChatsIdImagesPostRequest, localVarRequestOptions, configuration)
|
localVarRequestOptions.data = serializeDataIfNeeded(apiV1ChatsIdFilesPostRequest, localVarRequestOptions, configuration)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
url: toPathString(localVarUrlObj),
|
url: toPathString(localVarUrlObj),
|
||||||
@ -3099,17 +3105,17 @@ export const ChatMessageApiFp = function(configuration?: Configuration) {
|
|||||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 将一个图片添加到聊天记录中
|
* 将一个文件添加到聊天记录中
|
||||||
* @summary 添加图片
|
* @summary 添加文件
|
||||||
* @param {number} id
|
* @param {number} id
|
||||||
* @param {ApiV1ChatsIdImagesPostRequest} apiV1ChatsIdImagesPostRequest
|
* @param {ApiV1ChatsIdFilesPostRequest} apiV1ChatsIdFilesPostRequest
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async apiV1ChatsIdImagesPost(id: number, apiV1ChatsIdImagesPostRequest: ApiV1ChatsIdImagesPostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatPublicChatIdImagesPost200Response>> {
|
async apiV1ChatsIdFilesPost(id: number, apiV1ChatsIdFilesPostRequest: ApiV1ChatsIdFilesPostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatPublicChatIdImagesPost200Response>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatsIdImagesPost(id, apiV1ChatsIdImagesPostRequest, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatsIdFilesPost(id, apiV1ChatsIdFilesPostRequest, options);
|
||||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||||
const localVarOperationServerBasePath = operationServerMap['ChatMessageApi.apiV1ChatsIdImagesPost']?.[localVarOperationServerIndex]?.url;
|
const localVarOperationServerBasePath = operationServerMap['ChatMessageApi.apiV1ChatsIdFilesPost']?.[localVarOperationServerIndex]?.url;
|
||||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -3174,15 +3180,15 @@ export const ChatMessageApiFactory = function (configuration?: Configuration, ba
|
|||||||
return localVarFp.apiV1ChatsIdClearPost(id, options).then((request) => request(axios, basePath));
|
return localVarFp.apiV1ChatsIdClearPost(id, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 将一个图片添加到聊天记录中
|
* 将一个文件添加到聊天记录中
|
||||||
* @summary 添加图片
|
* @summary 添加文件
|
||||||
* @param {number} id
|
* @param {number} id
|
||||||
* @param {ApiV1ChatsIdImagesPostRequest} apiV1ChatsIdImagesPostRequest
|
* @param {ApiV1ChatsIdFilesPostRequest} apiV1ChatsIdFilesPostRequest
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
apiV1ChatsIdImagesPost(id: number, apiV1ChatsIdImagesPostRequest: ApiV1ChatsIdImagesPostRequest, options?: any): AxiosPromise<ApiV1ChatPublicChatIdImagesPost200Response> {
|
apiV1ChatsIdFilesPost(id: number, apiV1ChatsIdFilesPostRequest: ApiV1ChatsIdFilesPostRequest, options?: any): AxiosPromise<ApiV1ChatPublicChatIdImagesPost200Response> {
|
||||||
return localVarFp.apiV1ChatsIdImagesPost(id, apiV1ChatsIdImagesPostRequest, options).then((request) => request(axios, basePath));
|
return localVarFp.apiV1ChatsIdFilesPost(id, apiV1ChatsIdFilesPostRequest, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* get string by ID
|
* get string by ID
|
||||||
@ -3239,16 +3245,16 @@ export class ChatMessageApi extends BaseAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将一个图片添加到聊天记录中
|
* 将一个文件添加到聊天记录中
|
||||||
* @summary 添加图片
|
* @summary 添加文件
|
||||||
* @param {number} id
|
* @param {number} id
|
||||||
* @param {ApiV1ChatsIdImagesPostRequest} apiV1ChatsIdImagesPostRequest
|
* @param {ApiV1ChatsIdFilesPostRequest} apiV1ChatsIdFilesPostRequest
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof ChatMessageApi
|
* @memberof ChatMessageApi
|
||||||
*/
|
*/
|
||||||
public apiV1ChatsIdImagesPost(id: number, apiV1ChatsIdImagesPostRequest: ApiV1ChatsIdImagesPostRequest, options?: RawAxiosRequestConfig) {
|
public apiV1ChatsIdFilesPost(id: number, apiV1ChatsIdFilesPostRequest: ApiV1ChatsIdFilesPostRequest, options?: RawAxiosRequestConfig) {
|
||||||
return ChatMessageApiFp(this.configuration).apiV1ChatsIdImagesPost(id, apiV1ChatsIdImagesPostRequest, options).then((request) => request(this.axios, this.basePath));
|
return ChatMessageApiFp(this.configuration).apiV1ChatsIdFilesPost(id, apiV1ChatsIdFilesPostRequest, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -3904,12 +3910,153 @@ export class FileApi extends BaseAPI {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LibrariesApi - axios parameter creator
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
|
export const LibrariesApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||||
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 获取所有的资料库
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiV1LibrariesGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
const localVarPath = `/api/v1/libraries`;
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
// authentication ApiKeyAuth required
|
||||||
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LibrariesApi - functional programming interface
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
|
export const LibrariesApiFp = function(configuration?: Configuration) {
|
||||||
|
const localVarAxiosParamCreator = LibrariesApiAxiosParamCreator(configuration)
|
||||||
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 获取所有的资料库
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiV1LibrariesGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1LibrariesGet200Response>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1LibrariesGet(options);
|
||||||
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||||
|
const localVarOperationServerBasePath = operationServerMap['LibrariesApi.apiV1LibrariesGet']?.[localVarOperationServerIndex]?.url;
|
||||||
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LibrariesApi - factory interface
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
|
export const LibrariesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
|
const localVarFp = LibrariesApiFp(configuration)
|
||||||
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 获取所有的资料库
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiV1LibrariesGet(options?: any): AxiosPromise<ApiV1LibrariesGet200Response> {
|
||||||
|
return localVarFp.apiV1LibrariesGet(options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LibrariesApi - object-oriented interface
|
||||||
|
* @export
|
||||||
|
* @class LibrariesApi
|
||||||
|
* @extends {BaseAPI}
|
||||||
|
*/
|
||||||
|
export class LibrariesApi extends BaseAPI {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 获取所有的资料库
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof LibrariesApi
|
||||||
|
*/
|
||||||
|
public apiV1LibrariesGet(options?: RawAxiosRequestConfig) {
|
||||||
|
return LibrariesApiFp(this.configuration).apiV1LibrariesGet(options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MemoiresApi - axios parameter creator
|
* MemoiresApi - axios parameter creator
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const MemoiresApiAxiosParamCreator = function (configuration?: Configuration) {
|
export const MemoiresApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||||
return {
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 删除资料库
|
||||||
|
* @param {number} id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiV1LibrariesIdDelete: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'id' is not null or undefined
|
||||||
|
assertParamExists('apiV1LibrariesIdDelete', 'id', id)
|
||||||
|
const localVarPath = `/api/v1/libraries/{id}`
|
||||||
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
// authentication ApiKeyAuth required
|
||||||
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取所有的记忆
|
* @summary 获取所有的记忆
|
||||||
@ -4023,13 +4170,26 @@ export const MemoiresApiAxiosParamCreator = function (configuration?: Configurat
|
|||||||
export const MemoiresApiFp = function(configuration?: Configuration) {
|
export const MemoiresApiFp = function(configuration?: Configuration) {
|
||||||
const localVarAxiosParamCreator = MemoiresApiAxiosParamCreator(configuration)
|
const localVarAxiosParamCreator = MemoiresApiAxiosParamCreator(configuration)
|
||||||
return {
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 删除资料库
|
||||||
|
* @param {number} id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiV1LibrariesIdDelete(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1LibrariesIdDelete(id, options);
|
||||||
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||||
|
const localVarOperationServerBasePath = operationServerMap['MemoiresApi.apiV1LibrariesIdDelete']?.[localVarOperationServerIndex]?.url;
|
||||||
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取所有的记忆
|
* @summary 获取所有的记忆
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async apiV1MemoriesGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1MemoriesGet200Response>> {
|
async apiV1MemoriesGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1LibrariesGet200Response>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1MemoriesGet(options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1MemoriesGet(options);
|
||||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||||
const localVarOperationServerBasePath = operationServerMap['MemoiresApi.apiV1MemoriesGet']?.[localVarOperationServerIndex]?.url;
|
const localVarOperationServerBasePath = operationServerMap['MemoiresApi.apiV1MemoriesGet']?.[localVarOperationServerIndex]?.url;
|
||||||
@ -4070,13 +4230,23 @@ export const MemoiresApiFp = function(configuration?: Configuration) {
|
|||||||
export const MemoiresApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
export const MemoiresApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
const localVarFp = MemoiresApiFp(configuration)
|
const localVarFp = MemoiresApiFp(configuration)
|
||||||
return {
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 删除资料库
|
||||||
|
* @param {number} id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiV1LibrariesIdDelete(id: number, options?: any): AxiosPromise<void> {
|
||||||
|
return localVarFp.apiV1LibrariesIdDelete(id, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取所有的记忆
|
* @summary 获取所有的记忆
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
apiV1MemoriesGet(options?: any): AxiosPromise<ApiV1MemoriesGet200Response> {
|
apiV1MemoriesGet(options?: any): AxiosPromise<ApiV1LibrariesGet200Response> {
|
||||||
return localVarFp.apiV1MemoriesGet(options).then((request) => request(axios, basePath));
|
return localVarFp.apiV1MemoriesGet(options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -4108,6 +4278,18 @@ export const MemoiresApiFactory = function (configuration?: Configuration, baseP
|
|||||||
* @extends {BaseAPI}
|
* @extends {BaseAPI}
|
||||||
*/
|
*/
|
||||||
export class MemoiresApi extends BaseAPI {
|
export class MemoiresApi extends BaseAPI {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 删除资料库
|
||||||
|
* @param {number} id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof MemoiresApi
|
||||||
|
*/
|
||||||
|
public apiV1LibrariesIdDelete(id: number, options?: RawAxiosRequestConfig) {
|
||||||
|
return MemoiresApiFp(this.configuration).apiV1LibrariesIdDelete(id, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取所有的记忆
|
* @summary 获取所有的记忆
|
||||||
|
@ -74,15 +74,15 @@
|
|||||||
label="输入消息"
|
label="输入消息"
|
||||||
@keyup.enter="sendMessage"
|
@keyup.enter="sendMessage"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
<v-file-input v-model="fileUpload" label="选择图片"></v-file-input>
|
<v-file-input v-model="fileUpload" label="选择文件"></v-file-input>
|
||||||
|
|
||||||
<v-btn color="primary" @click="sendMessage">发送</v-btn>
|
<v-btn color="primary" @click="sendMessage">发送</v-btn>
|
||||||
<v-btn
|
<v-btn
|
||||||
class="ml-2"
|
class="ml-2"
|
||||||
color="primary"
|
color="primary"
|
||||||
:loading="uploading"
|
:loading="uploading"
|
||||||
@click="uploadImage"
|
@click="uploadFile"
|
||||||
>上传图片</v-btn
|
>上传文件</v-btn
|
||||||
>
|
>
|
||||||
|
|
||||||
<v-btn class="ml-2" color="primary" @click="clearMessages">清空</v-btn>
|
<v-btn class="ml-2" color="primary" @click="clearMessages">清空</v-btn>
|
||||||
@ -278,16 +278,16 @@ const deleteChat = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const uploadImage = () => {
|
const uploadFile = () => {
|
||||||
if (!fileUpload.value) {
|
if (!fileUpload.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uploading.value = true;
|
uploading.value = true;
|
||||||
api.ChatMessage.apiV1ChatsIdImagesPost(
|
api.ChatMessage.apiV1ChatsIdFilesPost(
|
||||||
chatId,
|
chatId,
|
||||||
{
|
{
|
||||||
image: fileUpload.value,
|
file: fileUpload.value,
|
||||||
url: "",
|
url: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user