From 2e7a23b1171213b78bae2ad2174a58b0c4154aff Mon Sep 17 00:00:00 2001 From: Twilight Date: Sun, 15 Sep 2024 15:23:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/swagger.yaml | 235 +++++++++--------- src/api/api.ts | 616 +++++++++++++++++++++++------------------------ 2 files changed, 424 insertions(+), 427 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index b6834f1..fb0013b 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -9,13 +9,11 @@ definitions: type: boolean disable_memory: type: boolean - enable_memory_for_assistant_share: + enable_memory_for_assistant_api: type: boolean id: description: Id schema.EntityId `gorm:"primarykey" json:"id,string"` type: integer - library: - $ref: '#/definitions/entity.Library' library_id: type: integer name: @@ -27,7 +25,7 @@ definitions: user_id: type: string type: object - entity.AssistantShare: + entity.AssistantKey: properties: assistant: $ref: '#/definitions/entity.Assistant' @@ -38,7 +36,7 @@ definitions: id: description: Id schema.EntityId `gorm:"primarykey" json:"id,string"` type: integer - token: + secret: type: string updated_at: type: string @@ -245,7 +243,7 @@ definitions: type: object schema.AddPublicChatMessageRequest: properties: - assistant_token: + assistant_key: type: string guest_id: type: string @@ -260,7 +258,7 @@ definitions: - assistant type: string required: - - assistant_token + - assistant_key - guest_id - message - role @@ -307,7 +305,7 @@ definitions: - true - false type: boolean - enable_memory_for_assistant_share: + enable_memory_for_assistant_api: enum: - true - false @@ -369,7 +367,7 @@ definitions: type: object schema.ChatPublicRequest: properties: - assistant_token: + assistant_key: type: string guest_id: type: string @@ -377,7 +375,7 @@ definitions: maxLength: 32 type: string required: - - assistant_token + - assistant_key - guest_id - name type: object @@ -436,12 +434,12 @@ definitions: type: object schema.GetPublicChatMessageRequest: properties: - assistant_token: + assistant_key: type: string guest_id: type: string required: - - assistant_token + - assistant_key - guest_id type: object schema.LibraryCreateRequest: @@ -558,16 +556,16 @@ definitions: description: maxLength: 255 type: string - name: + discovery_url: maxLength: 255 type: string - url: + name: maxLength: 255 type: string required: - description + - discovery_url - name - - url type: object schema.ToolDiscoveryInput: properties: @@ -828,6 +826,99 @@ paths: summary: 更新 Assistant tags: - assistant + /api/v1/assistants/{id}/keys: + get: + consumes: + - application/json + description: 此 API 可以创建一个 Assistant API Key,可以将你的 Assistant 公开出去使用。 + parameters: + - in: path + name: id + required: true + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/schema.ResponseBody' + - properties: + data: + items: + $ref: '#/definitions/entity.AssistantKey' + type: array + type: object + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/schema.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 获取 Assistant API Key列表 + tags: + - assistant + post: + consumes: + - application/json + description: 此方法将会获取一个 Token,用户将会通过这个 Token 来访问你的 Assistant 并调用工具。 + parameters: + - in: path + name: id + required: true + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/schema.ResponseBody' + - properties: + data: + $ref: '#/definitions/entity.AssistantKey' + type: object + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/schema.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 创建 Assistant API Key + tags: + - assistant + /api/v1/assistants/{id}/keys/{key_id}: + delete: + consumes: + - application/json + description: 此方法将会删除API Key,删除后,API Key将会立即失效。 + parameters: + - in: path + name: id + required: true + type: integer + - in: path + name: key_id + required: true + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/schema.ResponseBody' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/schema.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 删除 Assistant API Key + tags: + - assistant /api/v1/assistants/{id}/library: delete: consumes: @@ -879,99 +970,6 @@ paths: summary: 绑定资料库 tags: - assistant - /api/v1/assistants/{id}/shares: - get: - consumes: - - application/json - description: 此 API 可以创建一个 Assistant 共享 Token,可以将你的 Assistant 公开出去使用。 - parameters: - - in: path - name: id - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - allOf: - - $ref: '#/definitions/schema.ResponseBody' - - properties: - data: - items: - $ref: '#/definitions/entity.AssistantShare' - type: array - type: object - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/schema.ResponseBody' - security: - - ApiKeyAuth: [] - summary: 获取 Assistant 共享列表 - tags: - - assistant - post: - consumes: - - application/json - description: 此方法将会获取一个 Token,用户将会通过这个 Token 来访问你的 Assistant 并调用工具。 - parameters: - - in: path - name: id - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - allOf: - - $ref: '#/definitions/schema.ResponseBody' - - properties: - data: - $ref: '#/definitions/entity.AssistantShare' - type: object - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/schema.ResponseBody' - security: - - ApiKeyAuth: [] - summary: 创建 Assistant 共享 - tags: - - assistant - /api/v1/assistants/{id}/shares/{share_id}: - delete: - consumes: - - application/json - description: 此方法将会删除共享,删除后,共享将会立即失效。 - parameters: - - in: path - name: id - required: true - type: integer - - in: path - name: share_id - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/schema.ResponseBody' - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/schema.ResponseBody' - security: - - ApiKeyAuth: [] - summary: 删除 Assistant 共享 - tags: - - assistant /api/v1/assistants/{id}/tools: get: consumes: @@ -1183,7 +1181,7 @@ paths: required: true type: integer - in: formData - name: assistant_token + name: assistant_key required: true type: string - in: formData @@ -1244,7 +1242,7 @@ paths: required: true type: integer - in: query - name: assistant_token + name: assistant_key required: true type: string - in: query @@ -1326,7 +1324,7 @@ paths: get: consumes: - application/json - description: get string by ID + description: 列出当前账户下的所有的对话 parameters: - description: Assistant ID in: query @@ -1358,7 +1356,7 @@ paths: post: consumes: - application/json - description: get string by ID + description: 创建一个对话,如果不指定 Assistant ID,将会使用默认 Assistant。默认 Assistant 不支持上传文件以及使用外部工具。 parameters: - description: Chat in: body @@ -1395,7 +1393,7 @@ paths: delete: consumes: - application/json - description: get string by ID + description: 删除一个对话以及聊天记录 parameters: - description: Chat ID in: path @@ -1604,7 +1602,7 @@ paths: get: consumes: - application/json - description: get string by ID + description: 获取一个对话的所有聊天记录 parameters: - in: path name: id @@ -1644,7 +1642,7 @@ paths: post: consumes: - application/json - description: get string by ID + description: 添加一条消息 parameters: - in: path name: id @@ -2027,7 +2025,8 @@ paths: get: consumes: - application/json - description: get string by ID + deprecated: true + description: 测试接口,将会返回当前用户的信息 produces: - application/json responses: @@ -2053,7 +2052,7 @@ paths: get: consumes: - application/json - description: get string by ID + description: 将会通过 SSE 的方式来流式传输内容,不建议使用本文档生成的代码来获取,第三方库有更好的解决方案。 parameters: - description: 指定聊天中的用户 IP 地址,不指定则自动获取。此 IP 地址只会增加至 Prompt 中,如果不希望增加,请关闭系统自带 Prompt 选项 @@ -2100,7 +2099,7 @@ paths: $ref: '#/definitions/schema.ResponseBody' security: - none: [] - summary: 流式传输聊天内容 + summary: 流式传输文本 tags: - chat_message /api/v1/tools: diff --git a/src/api/api.ts b/src/api/api.ts index 40c2efd..c761e62 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -57,62 +57,62 @@ export interface ApiV1AssistantsGet200Response { /** * * @export - * @interface ApiV1AssistantsIdSharesGet200Response + * @interface ApiV1AssistantsIdKeysGet200Response */ -export interface ApiV1AssistantsIdSharesGet200Response { +export interface ApiV1AssistantsIdKeysGet200Response { /** * - * @type {Array} - * @memberof ApiV1AssistantsIdSharesGet200Response + * @type {Array} + * @memberof ApiV1AssistantsIdKeysGet200Response */ - 'data'?: Array; + 'data'?: Array; /** * * @type {string} - * @memberof ApiV1AssistantsIdSharesGet200Response + * @memberof ApiV1AssistantsIdKeysGet200Response */ 'error'?: string; /** * * @type {string} - * @memberof ApiV1AssistantsIdSharesGet200Response + * @memberof ApiV1AssistantsIdKeysGet200Response */ 'message'?: string; /** * * @type {boolean} - * @memberof ApiV1AssistantsIdSharesGet200Response + * @memberof ApiV1AssistantsIdKeysGet200Response */ 'success'?: boolean; } /** * * @export - * @interface ApiV1AssistantsIdSharesPost200Response + * @interface ApiV1AssistantsIdKeysPost200Response */ -export interface ApiV1AssistantsIdSharesPost200Response { +export interface ApiV1AssistantsIdKeysPost200Response { /** * - * @type {EntityAssistantShare} - * @memberof ApiV1AssistantsIdSharesPost200Response + * @type {EntityAssistantKey} + * @memberof ApiV1AssistantsIdKeysPost200Response */ - 'data'?: EntityAssistantShare; + 'data'?: EntityAssistantKey; /** * * @type {string} - * @memberof ApiV1AssistantsIdSharesPost200Response + * @memberof ApiV1AssistantsIdKeysPost200Response */ 'error'?: string; /** * * @type {string} - * @memberof ApiV1AssistantsIdSharesPost200Response + * @memberof ApiV1AssistantsIdKeysPost200Response */ 'message'?: string; /** * * @type {boolean} - * @memberof ApiV1AssistantsIdSharesPost200Response + * @memberof ApiV1AssistantsIdKeysPost200Response */ 'success'?: boolean; } @@ -251,7 +251,7 @@ export interface ApiV1ChatPublicChatIdImagesPostRequest { * @type {string} * @memberof ApiV1ChatPublicChatIdImagesPostRequest */ - 'assistant_token': string; + 'assistant_key': string; /** * * @type {string} @@ -635,19 +635,13 @@ export interface EntityAssistant { * @type {boolean} * @memberof EntityAssistant */ - 'enable_memory_for_assistant_share'?: boolean; + 'enable_memory_for_assistant_api'?: boolean; /** * Id schema.EntityId `gorm:\"primarykey\" json:\"id,string\"` * @type {number} * @memberof EntityAssistant */ 'id'?: number; - /** - * - * @type {EntityLibrary} - * @memberof EntityAssistant - */ - 'library'?: EntityLibrary; /** * * @type {number} @@ -682,43 +676,43 @@ export interface EntityAssistant { /** * * @export - * @interface EntityAssistantShare + * @interface EntityAssistantKey */ -export interface EntityAssistantShare { +export interface EntityAssistantKey { /** * * @type {EntityAssistant} - * @memberof EntityAssistantShare + * @memberof EntityAssistantKey */ 'assistant'?: EntityAssistant; /** * * @type {number} - * @memberof EntityAssistantShare + * @memberof EntityAssistantKey */ 'assistant_id'?: number; /** * * @type {string} - * @memberof EntityAssistantShare + * @memberof EntityAssistantKey */ 'created_at'?: string; /** * Id schema.EntityId `gorm:\"primarykey\" json:\"id,string\"` * @type {number} - * @memberof EntityAssistantShare + * @memberof EntityAssistantKey */ 'id'?: number; /** * * @type {string} - * @memberof EntityAssistantShare + * @memberof EntityAssistantKey */ - 'token'?: string; + 'secret'?: string; /** * * @type {string} - * @memberof EntityAssistantShare + * @memberof EntityAssistantKey */ 'updated_at'?: string; } @@ -1258,7 +1252,7 @@ export interface SchemaAddPublicChatMessageRequest { * @type {string} * @memberof SchemaAddPublicChatMessageRequest */ - 'assistant_token': string; + 'assistant_key': string; /** * * @type {string} @@ -1362,7 +1356,7 @@ export interface SchemaAssistantUpdateRequest { * @type {boolean} * @memberof SchemaAssistantUpdateRequest */ - 'enable_memory_for_assistant_share'?: boolean; + 'enable_memory_for_assistant_api'?: boolean; /** * * @type {number} @@ -1487,7 +1481,7 @@ export interface SchemaChatPublicRequest { * @type {string} * @memberof SchemaChatPublicRequest */ - 'assistant_token': string; + 'assistant_key': string; /** * * @type {string} @@ -1631,7 +1625,7 @@ export interface SchemaGetPublicChatMessageRequest { * @type {string} * @memberof SchemaGetPublicChatMessageRequest */ - 'assistant_token': string; + 'assistant_key': string; /** * * @type {string} @@ -1917,13 +1911,13 @@ export interface SchemaToolCreateRequest { * @type {string} * @memberof SchemaToolCreateRequest */ - 'name': string; + 'discovery_url': string; /** * * @type {string} * @memberof SchemaToolCreateRequest */ - 'url': string; + 'name': string; } /** * @@ -2173,6 +2167,121 @@ export const AssistantApiAxiosParamCreator = function (configuration?: Configura + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 此 API 可以创建一个 Assistant API Key,可以将你的 Assistant 公开出去使用。 + * @summary 获取 Assistant API Key列表 + * @param {number} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1AssistantsIdKeysGet: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('apiV1AssistantsIdKeysGet', 'id', id) + const localVarPath = `/api/v1/assistants/{id}/keys` + .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: '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, + }; + }, + /** + * 此方法将会删除API Key,删除后,API Key将会立即失效。 + * @summary 删除 Assistant API Key + * @param {number} id + * @param {number} keyId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1AssistantsIdKeysKeyIdDelete: async (id: number, keyId: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('apiV1AssistantsIdKeysKeyIdDelete', 'id', id) + // verify required parameter 'keyId' is not null or undefined + assertParamExists('apiV1AssistantsIdKeysKeyIdDelete', 'keyId', keyId) + const localVarPath = `/api/v1/assistants/{id}/keys/{key_id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"key_id"}}`, encodeURIComponent(String(keyId))); + // 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, + }; + }, + /** + * 此方法将会获取一个 Token,用户将会通过这个 Token 来访问你的 Assistant 并调用工具。 + * @summary 创建 Assistant API Key + * @param {number} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1AssistantsIdKeysPost: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('apiV1AssistantsIdKeysPost', 'id', id) + const localVarPath = `/api/v1/assistants/{id}/keys` + .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: 'POST', ...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}; @@ -2305,121 +2414,6 @@ export const AssistantApiAxiosParamCreator = function (configuration?: Configura options: localVarRequestOptions, }; }, - /** - * 此 API 可以创建一个 Assistant 共享 Token,可以将你的 Assistant 公开出去使用。 - * @summary 获取 Assistant 共享列表 - * @param {number} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1AssistantsIdSharesGet: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('apiV1AssistantsIdSharesGet', 'id', id) - const localVarPath = `/api/v1/assistants/{id}/shares` - .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: '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, - }; - }, - /** - * 此方法将会获取一个 Token,用户将会通过这个 Token 来访问你的 Assistant 并调用工具。 - * @summary 创建 Assistant 共享 - * @param {number} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1AssistantsIdSharesPost: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('apiV1AssistantsIdSharesPost', 'id', id) - const localVarPath = `/api/v1/assistants/{id}/shares` - .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: 'POST', ...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 删除 Assistant 共享 - * @param {number} id - * @param {number} shareId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1AssistantsIdSharesShareIdDelete: async (id: number, shareId: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('apiV1AssistantsIdSharesShareIdDelete', 'id', id) - // verify required parameter 'shareId' is not null or undefined - assertParamExists('apiV1AssistantsIdSharesShareIdDelete', 'shareId', shareId) - const localVarPath = `/api/v1/assistants/{id}/shares/{share_id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"share_id"}}`, encodeURIComponent(String(shareId))); - // 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 获取 Assistant 所绑定的 Tool @@ -2626,6 +2620,46 @@ export const AssistantApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdGet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * 此 API 可以创建一个 Assistant API Key,可以将你的 Assistant 公开出去使用。 + * @summary 获取 Assistant API Key列表 + * @param {number} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV1AssistantsIdKeysGet(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdKeysGet(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdKeysGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * 此方法将会删除API Key,删除后,API Key将会立即失效。 + * @summary 删除 Assistant API Key + * @param {number} id + * @param {number} keyId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV1AssistantsIdKeysKeyIdDelete(id: number, keyId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdKeysKeyIdDelete(id, keyId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdKeysKeyIdDelete']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * 此方法将会获取一个 Token,用户将会通过这个 Token 来访问你的 Assistant 并调用工具。 + * @summary 创建 Assistant API Key + * @param {number} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV1AssistantsIdKeysPost(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdKeysPost(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdKeysPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * * @summary 解绑资料库 @@ -2667,46 +2701,6 @@ export const AssistantApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdPut']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, - /** - * 此 API 可以创建一个 Assistant 共享 Token,可以将你的 Assistant 公开出去使用。 - * @summary 获取 Assistant 共享列表 - * @param {number} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiV1AssistantsIdSharesGet(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdSharesGet(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdSharesGet']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * 此方法将会获取一个 Token,用户将会通过这个 Token 来访问你的 Assistant 并调用工具。 - * @summary 创建 Assistant 共享 - * @param {number} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiV1AssistantsIdSharesPost(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdSharesPost(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdSharesPost']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * 此方法将会删除共享,删除后,共享将会立即失效。 - * @summary 删除 Assistant 共享 - * @param {number} id - * @param {number} shareId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiV1AssistantsIdSharesShareIdDelete(id: number, shareId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdSharesShareIdDelete(id, shareId, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdSharesShareIdDelete']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, /** * * @summary 获取 Assistant 所绑定的 Tool @@ -2800,6 +2794,37 @@ export const AssistantApiFactory = function (configuration?: Configuration, base apiV1AssistantsIdGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.apiV1AssistantsIdGet(id, options).then((request) => request(axios, basePath)); }, + /** + * 此 API 可以创建一个 Assistant API Key,可以将你的 Assistant 公开出去使用。 + * @summary 获取 Assistant API Key列表 + * @param {number} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1AssistantsIdKeysGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.apiV1AssistantsIdKeysGet(id, options).then((request) => request(axios, basePath)); + }, + /** + * 此方法将会删除API Key,删除后,API Key将会立即失效。 + * @summary 删除 Assistant API Key + * @param {number} id + * @param {number} keyId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1AssistantsIdKeysKeyIdDelete(id: number, keyId: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.apiV1AssistantsIdKeysKeyIdDelete(id, keyId, options).then((request) => request(axios, basePath)); + }, + /** + * 此方法将会获取一个 Token,用户将会通过这个 Token 来访问你的 Assistant 并调用工具。 + * @summary 创建 Assistant API Key + * @param {number} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1AssistantsIdKeysPost(id: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.apiV1AssistantsIdKeysPost(id, options).then((request) => request(axios, basePath)); + }, /** * * @summary 解绑资料库 @@ -2832,37 +2857,6 @@ export const AssistantApiFactory = function (configuration?: Configuration, base apiV1AssistantsIdPut(id: number, assistantUpdateRequest: SchemaAssistantUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.apiV1AssistantsIdPut(id, assistantUpdateRequest, options).then((request) => request(axios, basePath)); }, - /** - * 此 API 可以创建一个 Assistant 共享 Token,可以将你的 Assistant 公开出去使用。 - * @summary 获取 Assistant 共享列表 - * @param {number} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1AssistantsIdSharesGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.apiV1AssistantsIdSharesGet(id, options).then((request) => request(axios, basePath)); - }, - /** - * 此方法将会获取一个 Token,用户将会通过这个 Token 来访问你的 Assistant 并调用工具。 - * @summary 创建 Assistant 共享 - * @param {number} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1AssistantsIdSharesPost(id: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.apiV1AssistantsIdSharesPost(id, options).then((request) => request(axios, basePath)); - }, - /** - * 此方法将会删除共享,删除后,共享将会立即失效。 - * @summary 删除 Assistant 共享 - * @param {number} id - * @param {number} shareId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1AssistantsIdSharesShareIdDelete(id: number, shareId: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.apiV1AssistantsIdSharesShareIdDelete(id, shareId, options).then((request) => request(axios, basePath)); - }, /** * * @summary 获取 Assistant 所绑定的 Tool @@ -2950,6 +2944,43 @@ export class AssistantApi extends BaseAPI { return AssistantApiFp(this.configuration).apiV1AssistantsIdGet(id, options).then((request) => request(this.axios, this.basePath)); } + /** + * 此 API 可以创建一个 Assistant API Key,可以将你的 Assistant 公开出去使用。 + * @summary 获取 Assistant API Key列表 + * @param {number} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AssistantApi + */ + public apiV1AssistantsIdKeysGet(id: number, options?: RawAxiosRequestConfig) { + return AssistantApiFp(this.configuration).apiV1AssistantsIdKeysGet(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 此方法将会删除API Key,删除后,API Key将会立即失效。 + * @summary 删除 Assistant API Key + * @param {number} id + * @param {number} keyId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AssistantApi + */ + public apiV1AssistantsIdKeysKeyIdDelete(id: number, keyId: number, options?: RawAxiosRequestConfig) { + return AssistantApiFp(this.configuration).apiV1AssistantsIdKeysKeyIdDelete(id, keyId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 此方法将会获取一个 Token,用户将会通过这个 Token 来访问你的 Assistant 并调用工具。 + * @summary 创建 Assistant API Key + * @param {number} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AssistantApi + */ + public apiV1AssistantsIdKeysPost(id: number, options?: RawAxiosRequestConfig) { + return AssistantApiFp(this.configuration).apiV1AssistantsIdKeysPost(id, options).then((request) => request(this.axios, this.basePath)); + } + /** * * @summary 解绑资料库 @@ -2988,43 +3019,6 @@ export class AssistantApi extends BaseAPI { return AssistantApiFp(this.configuration).apiV1AssistantsIdPut(id, assistantUpdateRequest, options).then((request) => request(this.axios, this.basePath)); } - /** - * 此 API 可以创建一个 Assistant 共享 Token,可以将你的 Assistant 公开出去使用。 - * @summary 获取 Assistant 共享列表 - * @param {number} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AssistantApi - */ - public apiV1AssistantsIdSharesGet(id: number, options?: RawAxiosRequestConfig) { - return AssistantApiFp(this.configuration).apiV1AssistantsIdSharesGet(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * 此方法将会获取一个 Token,用户将会通过这个 Token 来访问你的 Assistant 并调用工具。 - * @summary 创建 Assistant 共享 - * @param {number} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AssistantApi - */ - public apiV1AssistantsIdSharesPost(id: number, options?: RawAxiosRequestConfig) { - return AssistantApiFp(this.configuration).apiV1AssistantsIdSharesPost(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * 此方法将会删除共享,删除后,共享将会立即失效。 - * @summary 删除 Assistant 共享 - * @param {number} id - * @param {number} shareId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AssistantApi - */ - public apiV1AssistantsIdSharesShareIdDelete(id: number, shareId: number, options?: RawAxiosRequestConfig) { - return AssistantApiFp(this.configuration).apiV1AssistantsIdSharesShareIdDelete(id, shareId, options).then((request) => request(this.axios, this.basePath)); - } - /** * * @summary 获取 Assistant 所绑定的 Tool @@ -3129,7 +3123,7 @@ export const ChatApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * get string by ID + * 列出当前账户下的所有的对话 * @summary 获取所有 Chat * @param {number} [assistantId] Assistant ID * @param {*} [options] Override http request option. @@ -3167,7 +3161,7 @@ export const ChatApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * get string by ID + * 删除一个对话以及聊天记录 * @summary Delete Chat * @param {number} id Chat ID * @param {*} [options] Override http request option. @@ -3284,7 +3278,7 @@ export const ChatApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * get string by ID + * 创建一个对话,如果不指定 Assistant ID,将会使用默认 Assistant。默认 Assistant 不支持上传文件以及使用外部工具。 * @summary Create Chat * @param {SchemaChatCreateRequest} chat Chat * @param {*} [options] Override http request option. @@ -3347,7 +3341,7 @@ export const ChatApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * get string by ID + * 列出当前账户下的所有的对话 * @summary 获取所有 Chat * @param {number} [assistantId] Assistant ID * @param {*} [options] Override http request option. @@ -3360,7 +3354,7 @@ export const ChatApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * get string by ID + * 删除一个对话以及聊天记录 * @summary Delete Chat * @param {number} id Chat ID * @param {*} [options] Override http request option. @@ -3400,7 +3394,7 @@ export const ChatApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * get string by ID + * 创建一个对话,如果不指定 Assistant ID,将会使用默认 Assistant。默认 Assistant 不支持上传文件以及使用外部工具。 * @summary Create Chat * @param {SchemaChatCreateRequest} chat Chat * @param {*} [options] Override http request option. @@ -3434,7 +3428,7 @@ export const ChatApiFactory = function (configuration?: Configuration, basePath? return localVarFp.apiOpenaiCompatibleV1ChatCompletionsPost(chat, xUserIP, options).then((request) => request(axios, basePath)); }, /** - * get string by ID + * 列出当前账户下的所有的对话 * @summary 获取所有 Chat * @param {number} [assistantId] Assistant ID * @param {*} [options] Override http request option. @@ -3444,7 +3438,7 @@ export const ChatApiFactory = function (configuration?: Configuration, basePath? return localVarFp.apiV1ChatsGet(assistantId, options).then((request) => request(axios, basePath)); }, /** - * get string by ID + * 删除一个对话以及聊天记录 * @summary Delete Chat * @param {number} id Chat ID * @param {*} [options] Override http request option. @@ -3475,7 +3469,7 @@ export const ChatApiFactory = function (configuration?: Configuration, basePath? return localVarFp.apiV1ChatsIdPut(id, schemaChatUpdateRequest, options).then((request) => request(axios, basePath)); }, /** - * get string by ID + * 创建一个对话,如果不指定 Assistant ID,将会使用默认 Assistant。默认 Assistant 不支持上传文件以及使用外部工具。 * @summary Create Chat * @param {SchemaChatCreateRequest} chat Chat * @param {*} [options] Override http request option. @@ -3508,7 +3502,7 @@ export class ChatApi extends BaseAPI { } /** - * get string by ID + * 列出当前账户下的所有的对话 * @summary 获取所有 Chat * @param {number} [assistantId] Assistant ID * @param {*} [options] Override http request option. @@ -3520,7 +3514,7 @@ export class ChatApi extends BaseAPI { } /** - * get string by ID + * 删除一个对话以及聊天记录 * @summary Delete Chat * @param {number} id Chat ID * @param {*} [options] Override http request option. @@ -3557,7 +3551,7 @@ export class ChatApi extends BaseAPI { } /** - * get string by ID + * 创建一个对话,如果不指定 Assistant ID,将会使用默认 Assistant。默认 Assistant 不支持上传文件以及使用外部工具。 * @summary Create Chat * @param {SchemaChatCreateRequest} chat Chat * @param {*} [options] Override http request option. @@ -3658,7 +3652,7 @@ export const ChatMessageApiAxiosParamCreator = function (configuration?: Configu }; }, /** - * get string by ID + * 获取一个对话的所有聊天记录 * @summary 查看聊天记录 * @param {number} id * @param {*} [options] Override http request option. @@ -3695,7 +3689,7 @@ export const ChatMessageApiAxiosParamCreator = function (configuration?: Configu }; }, /** - * get string by ID + * 添加一条消息 * @summary 添加聊天记录 * @param {number} id * @param {SchemaChatMessageAddRequest} message Message @@ -3738,8 +3732,8 @@ export const ChatMessageApiAxiosParamCreator = function (configuration?: Configu }; }, /** - * get string by ID - * @summary 流式传输聊天内容 + * 将会通过 SSE 的方式来流式传输内容,不建议使用本文档生成的代码来获取,第三方库有更好的解决方案。 + * @summary 流式传输文本 * @param {string} streamId Chat stream id * @param {string} [xUserIP] 指定聊天中的用户 IP 地址,不指定则自动获取。此 IP 地址只会增加至 Prompt 中,如果不希望增加,请关闭系统自带 Prompt 选项 * @param {*} [options] Override http request option. @@ -3814,7 +3808,7 @@ export const ChatMessageApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * get string by ID + * 获取一个对话的所有聊天记录 * @summary 查看聊天记录 * @param {number} id * @param {*} [options] Override http request option. @@ -3827,7 +3821,7 @@ export const ChatMessageApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * get string by ID + * 添加一条消息 * @summary 添加聊天记录 * @param {number} id * @param {SchemaChatMessageAddRequest} message Message @@ -3841,8 +3835,8 @@ export const ChatMessageApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * get string by ID - * @summary 流式传输聊天内容 + * 将会通过 SSE 的方式来流式传输内容,不建议使用本文档生成的代码来获取,第三方库有更好的解决方案。 + * @summary 流式传输文本 * @param {string} streamId Chat stream id * @param {string} [xUserIP] 指定聊天中的用户 IP 地址,不指定则自动获取。此 IP 地址只会增加至 Prompt 中,如果不希望增加,请关闭系统自带 Prompt 选项 * @param {*} [options] Override http request option. @@ -3886,7 +3880,7 @@ export const ChatMessageApiFactory = function (configuration?: Configuration, ba return localVarFp.apiV1ChatsIdFilesPost(id, apiV1ChatsIdFilesPostRequest, options).then((request) => request(axios, basePath)); }, /** - * get string by ID + * 获取一个对话的所有聊天记录 * @summary 查看聊天记录 * @param {number} id * @param {*} [options] Override http request option. @@ -3896,7 +3890,7 @@ export const ChatMessageApiFactory = function (configuration?: Configuration, ba return localVarFp.apiV1ChatsIdMessagesGet(id, options).then((request) => request(axios, basePath)); }, /** - * get string by ID + * 添加一条消息 * @summary 添加聊天记录 * @param {number} id * @param {SchemaChatMessageAddRequest} message Message @@ -3907,8 +3901,8 @@ export const ChatMessageApiFactory = function (configuration?: Configuration, ba return localVarFp.apiV1ChatsIdMessagesPost(id, message, options).then((request) => request(axios, basePath)); }, /** - * get string by ID - * @summary 流式传输聊天内容 + * 将会通过 SSE 的方式来流式传输内容,不建议使用本文档生成的代码来获取,第三方库有更好的解决方案。 + * @summary 流式传输文本 * @param {string} streamId Chat stream id * @param {string} [xUserIP] 指定聊天中的用户 IP 地址,不指定则自动获取。此 IP 地址只会增加至 Prompt 中,如果不希望增加,请关闭系统自带 Prompt 选项 * @param {*} [options] Override http request option. @@ -3953,7 +3947,7 @@ export class ChatMessageApi extends BaseAPI { } /** - * get string by ID + * 获取一个对话的所有聊天记录 * @summary 查看聊天记录 * @param {number} id * @param {*} [options] Override http request option. @@ -3965,7 +3959,7 @@ export class ChatMessageApi extends BaseAPI { } /** - * get string by ID + * 添加一条消息 * @summary 添加聊天记录 * @param {number} id * @param {SchemaChatMessageAddRequest} message Message @@ -3978,8 +3972,8 @@ export class ChatMessageApi extends BaseAPI { } /** - * get string by ID - * @summary 流式传输聊天内容 + * 将会通过 SSE 的方式来流式传输内容,不建议使用本文档生成的代码来获取,第三方库有更好的解决方案。 + * @summary 流式传输文本 * @param {string} streamId Chat stream id * @param {string} [xUserIP] 指定聊天中的用户 IP 地址,不指定则自动获取。此 IP 地址只会增加至 Prompt 中,如果不希望增加,请关闭系统自带 Prompt 选项 * @param {*} [options] Override http request option. @@ -4083,16 +4077,16 @@ export const ChatPublicApiAxiosParamCreator = function (configuration?: Configur * * @summary 获取公开对话的聊天记录 * @param {number} chatId - * @param {string} assistantToken + * @param {string} assistantKey * @param {string} guestId * @param {*} [options] Override http request option. * @throws {RequiredError} */ - apiV1ChatPublicChatIdMessagesGet: async (chatId: number, assistantToken: string, guestId: string, options: RawAxiosRequestConfig = {}): Promise => { + apiV1ChatPublicChatIdMessagesGet: async (chatId: number, assistantKey: string, guestId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'chatId' is not null or undefined assertParamExists('apiV1ChatPublicChatIdMessagesGet', 'chatId', chatId) - // verify required parameter 'assistantToken' is not null or undefined - assertParamExists('apiV1ChatPublicChatIdMessagesGet', 'assistantToken', assistantToken) + // verify required parameter 'assistantKey' is not null or undefined + assertParamExists('apiV1ChatPublicChatIdMessagesGet', 'assistantKey', assistantKey) // verify required parameter 'guestId' is not null or undefined assertParamExists('apiV1ChatPublicChatIdMessagesGet', 'guestId', guestId) const localVarPath = `/api/v1/chat_public/{chat_id}/messages` @@ -4108,8 +4102,8 @@ export const ChatPublicApiAxiosParamCreator = function (configuration?: Configur const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (assistantToken !== undefined) { - localVarQueryParameter['assistant_token'] = assistantToken; + if (assistantKey !== undefined) { + localVarQueryParameter['assistant_key'] = assistantKey; } if (guestId !== undefined) { @@ -4281,13 +4275,13 @@ export const ChatPublicApiFp = function(configuration?: Configuration) { * * @summary 获取公开对话的聊天记录 * @param {number} chatId - * @param {string} assistantToken + * @param {string} assistantKey * @param {string} guestId * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async apiV1ChatPublicChatIdMessagesGet(chatId: number, assistantToken: string, guestId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatPublicChatIdMessagesGet(chatId, assistantToken, guestId, options); + async apiV1ChatPublicChatIdMessagesGet(chatId: number, assistantKey: string, guestId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatPublicChatIdMessagesGet(chatId, assistantKey, guestId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ChatPublicApi.apiV1ChatPublicChatIdMessagesGet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -4368,13 +4362,13 @@ export const ChatPublicApiFactory = function (configuration?: Configuration, bas * * @summary 获取公开对话的聊天记录 * @param {number} chatId - * @param {string} assistantToken + * @param {string} assistantKey * @param {string} guestId * @param {*} [options] Override http request option. * @throws {RequiredError} */ - apiV1ChatPublicChatIdMessagesGet(chatId: number, assistantToken: string, guestId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.apiV1ChatPublicChatIdMessagesGet(chatId, assistantToken, guestId, options).then((request) => request(axios, basePath)); + apiV1ChatPublicChatIdMessagesGet(chatId: number, assistantKey: string, guestId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.apiV1ChatPublicChatIdMessagesGet(chatId, assistantKey, guestId, options).then((request) => request(axios, basePath)); }, /** * @@ -4447,14 +4441,14 @@ export class ChatPublicApi extends BaseAPI { * * @summary 获取公开对话的聊天记录 * @param {number} chatId - * @param {string} assistantToken + * @param {string} assistantKey * @param {string} guestId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChatPublicApi */ - public apiV1ChatPublicChatIdMessagesGet(chatId: number, assistantToken: string, guestId: string, options?: RawAxiosRequestConfig) { - return ChatPublicApiFp(this.configuration).apiV1ChatPublicChatIdMessagesGet(chatId, assistantToken, guestId, options).then((request) => request(this.axios, this.basePath)); + public apiV1ChatPublicChatIdMessagesGet(chatId: number, assistantKey: string, guestId: string, options?: RawAxiosRequestConfig) { + return ChatPublicApiFp(this.configuration).apiV1ChatPublicChatIdMessagesGet(chatId, assistantKey, guestId, options).then((request) => request(this.axios, this.basePath)); } /** @@ -5565,9 +5559,10 @@ export class MemoiresApi extends BaseAPI { export const PingApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * get string by ID + * 测试接口,将会返回当前用户的信息 * @summary Greet * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ apiV1PingGet: async (options: RawAxiosRequestConfig = {}): Promise => { @@ -5608,9 +5603,10 @@ export const PingApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = PingApiAxiosParamCreator(configuration) return { /** - * get string by ID + * 测试接口,将会返回当前用户的信息 * @summary Greet * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ async apiV1PingGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { @@ -5630,9 +5626,10 @@ export const PingApiFactory = function (configuration?: Configuration, basePath? const localVarFp = PingApiFp(configuration) return { /** - * get string by ID + * 测试接口,将会返回当前用户的信息 * @summary Greet * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ apiV1PingGet(options?: RawAxiosRequestConfig): AxiosPromise { @@ -5649,9 +5646,10 @@ export const PingApiFactory = function (configuration?: Configuration, basePath? */ export class PingApi extends BaseAPI { /** - * get string by ID + * 测试接口,将会返回当前用户的信息 * @summary Greet * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} * @memberof PingApi */