/* tslint:disable */
/* eslint-disable */
/**
 * Leaflow Amber
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


import type { Configuration } from './configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
import type { RequestArgs } from './base';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';

/**
 * 
 * @export
 * @interface ApiV1AssistantsFavoritesGet200Response
 */
export interface ApiV1AssistantsFavoritesGet200Response {
    /**
     * 
     * @type {PagePagedResultSchemaAssistantPublic}
     * @memberof ApiV1AssistantsFavoritesGet200Response
     */
    'data'?: PagePagedResultSchemaAssistantPublic;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsFavoritesGet200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsFavoritesGet200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1AssistantsFavoritesGet200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1AssistantsGet200Response
 */
export interface ApiV1AssistantsGet200Response {
    /**
     * 
     * @type {Array<EntityAssistant>}
     * @memberof ApiV1AssistantsGet200Response
     */
    'data'?: Array<EntityAssistant>;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsGet200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsGet200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1AssistantsGet200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1AssistantsIdKeysGet200Response
 */
export interface ApiV1AssistantsIdKeysGet200Response {
    /**
     * 
     * @type {Array<EntityAssistantKey>}
     * @memberof ApiV1AssistantsIdKeysGet200Response
     */
    'data'?: Array<EntityAssistantKey>;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsIdKeysGet200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsIdKeysGet200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1AssistantsIdKeysGet200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1AssistantsIdKeysPost200Response
 */
export interface ApiV1AssistantsIdKeysPost200Response {
    /**
     * 
     * @type {EntityAssistantKey}
     * @memberof ApiV1AssistantsIdKeysPost200Response
     */
    'data'?: EntityAssistantKey;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsIdKeysPost200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsIdKeysPost200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1AssistantsIdKeysPost200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1AssistantsIdToolsGet200Response
 */
export interface ApiV1AssistantsIdToolsGet200Response {
    /**
     * 
     * @type {Array<EntityAssistantTool>}
     * @memberof ApiV1AssistantsIdToolsGet200Response
     */
    'data'?: Array<EntityAssistantTool>;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsIdToolsGet200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsIdToolsGet200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1AssistantsIdToolsGet200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1AssistantsIdToolsToolIdPost200Response
 */
export interface ApiV1AssistantsIdToolsToolIdPost200Response {
    /**
     * 
     * @type {EntityAssistantTool}
     * @memberof ApiV1AssistantsIdToolsToolIdPost200Response
     */
    'data'?: EntityAssistantTool;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsIdToolsToolIdPost200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsIdToolsToolIdPost200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1AssistantsIdToolsToolIdPost200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1AssistantsPost200Response
 */
export interface ApiV1AssistantsPost200Response {
    /**
     * 
     * @type {EntityAssistant}
     * @memberof ApiV1AssistantsPost200Response
     */
    'data'?: EntityAssistant;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsPost200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsPost200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1AssistantsPost200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1AssistantsPublicIdPost200Response
 */
export interface ApiV1AssistantsPublicIdPost200Response {
    /**
     * 
     * @type {SchemaAssistantPublic}
     * @memberof ApiV1AssistantsPublicIdPost200Response
     */
    'data'?: SchemaAssistantPublic;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsPublicIdPost200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1AssistantsPublicIdPost200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1AssistantsPublicIdPost200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1ChatPublicChatIdImagesPost200Response
 */
export interface ApiV1ChatPublicChatIdImagesPost200Response {
    /**
     * 
     * @type {SchemaChatMessageResponse}
     * @memberof ApiV1ChatPublicChatIdImagesPost200Response
     */
    'data'?: SchemaChatMessageResponse;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ChatPublicChatIdImagesPost200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ChatPublicChatIdImagesPost200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1ChatPublicChatIdImagesPost200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1ChatPublicChatIdImagesPostRequest
 */
export interface ApiV1ChatPublicChatIdImagesPostRequest {
    /**
     * 
     * @type {string}
     * @memberof ApiV1ChatPublicChatIdImagesPostRequest
     */
    'assistant_key': string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ChatPublicChatIdImagesPostRequest
     */
    'guest_id': string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ChatPublicChatIdImagesPostRequest
     */
    'url': string;
    /**
     * 图片
     * @type {File}
     * @memberof ApiV1ChatPublicChatIdImagesPostRequest
     */
    'image'?: File;
}
/**
 * 
 * @export
 * @interface ApiV1ChatPublicChatIdMessagesGet200Response
 */
export interface ApiV1ChatPublicChatIdMessagesGet200Response {
    /**
     * 
     * @type {Array<EntityChatMessage>}
     * @memberof ApiV1ChatPublicChatIdMessagesGet200Response
     */
    'data'?: Array<EntityChatMessage>;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ChatPublicChatIdMessagesGet200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ChatPublicChatIdMessagesGet200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1ChatPublicChatIdMessagesGet200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1ChatPublicGet200Response
 */
export interface ApiV1ChatPublicGet200Response {
    /**
     * 
     * @type {Array<EntityChat>}
     * @memberof ApiV1ChatPublicGet200Response
     */
    'data'?: Array<EntityChat>;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ChatPublicGet200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ChatPublicGet200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1ChatPublicGet200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1ChatPublicPost200Response
 */
export interface ApiV1ChatPublicPost200Response {
    /**
     * 
     * @type {EntityChat}
     * @memberof ApiV1ChatPublicPost200Response
     */
    'data'?: EntityChat;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ChatPublicPost200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ChatPublicPost200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1ChatPublicPost200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1ChatsIdFilesPostRequest
 */
export interface ApiV1ChatsIdFilesPostRequest {
    /**
     * 
     * @type {string}
     * @memberof ApiV1ChatsIdFilesPostRequest
     */
    'url': string;
    /**
     * 文件
     * @type {File}
     * @memberof ApiV1ChatsIdFilesPostRequest
     */
    'file'?: File;
}
/**
 * 
 * @export
 * @interface ApiV1ChatsIdMessagesGet200Response
 */
export interface ApiV1ChatsIdMessagesGet200Response {
    /**
     * 
     * @type {Array<EntityChatMessageList>}
     * @memberof ApiV1ChatsIdMessagesGet200Response
     */
    'data'?: Array<EntityChatMessageList>;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ChatsIdMessagesGet200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ChatsIdMessagesGet200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1ChatsIdMessagesGet200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1LibrariesGet200Response
 */
export interface ApiV1LibrariesGet200Response {
    /**
     * 
     * @type {Array<EntityLibrary>}
     * @memberof ApiV1LibrariesGet200Response
     */
    'data'?: Array<EntityLibrary>;
    /**
     * 
     * @type {string}
     * @memberof ApiV1LibrariesGet200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1LibrariesGet200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1LibrariesGet200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1LibrariesIdDocumentsGet200Response
 */
export interface ApiV1LibrariesIdDocumentsGet200Response {
    /**
     * 
     * @type {Array<EntityDocument>}
     * @memberof ApiV1LibrariesIdDocumentsGet200Response
     */
    'data'?: Array<EntityDocument>;
    /**
     * 
     * @type {string}
     * @memberof ApiV1LibrariesIdDocumentsGet200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1LibrariesIdDocumentsGet200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1LibrariesIdDocumentsGet200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1LibrariesPost201Response
 */
export interface ApiV1LibrariesPost201Response {
    /**
     * 
     * @type {EntityLibrary}
     * @memberof ApiV1LibrariesPost201Response
     */
    'data'?: EntityLibrary;
    /**
     * 
     * @type {string}
     * @memberof ApiV1LibrariesPost201Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1LibrariesPost201Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1LibrariesPost201Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1MemoriesGet200Response
 */
export interface ApiV1MemoriesGet200Response {
    /**
     * 
     * @type {Array<EntityMemory>}
     * @memberof ApiV1MemoriesGet200Response
     */
    'data'?: Array<EntityMemory>;
    /**
     * 
     * @type {string}
     * @memberof ApiV1MemoriesGet200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1MemoriesGet200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1MemoriesGet200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1PingGet200Response
 */
export interface ApiV1PingGet200Response {
    /**
     * 
     * @type {SchemaCurrentUserResponse}
     * @memberof ApiV1PingGet200Response
     */
    'data'?: SchemaCurrentUserResponse;
    /**
     * 
     * @type {string}
     * @memberof ApiV1PingGet200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1PingGet200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1PingGet200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1ToolsGet200Response
 */
export interface ApiV1ToolsGet200Response {
    /**
     * 
     * @type {Array<EntityTool>}
     * @memberof ApiV1ToolsGet200Response
     */
    'data'?: Array<EntityTool>;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ToolsGet200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ToolsGet200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1ToolsGet200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1ToolsPost200Response
 */
export interface ApiV1ToolsPost200Response {
    /**
     * 
     * @type {EntityTool}
     * @memberof ApiV1ToolsPost200Response
     */
    'data'?: EntityTool;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ToolsPost200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1ToolsPost200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1ToolsPost200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface ApiV1UsageGet200Response
 */
export interface ApiV1UsageGet200Response {
    /**
     * 
     * @type {SchemaSiteUsageResponse}
     * @memberof ApiV1UsageGet200Response
     */
    'data'?: SchemaSiteUsageResponse;
    /**
     * 
     * @type {string}
     * @memberof ApiV1UsageGet200Response
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof ApiV1UsageGet200Response
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ApiV1UsageGet200Response
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface EntityAssistant
 */
export interface EntityAssistant {
    /**
     * 
     * @type {string}
     * @memberof EntityAssistant
     */
    'created_at'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityAssistant
     */
    'description'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof EntityAssistant
     */
    'disable_default_prompt'?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof EntityAssistant
     */
    'disable_internet_search'?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof EntityAssistant
     */
    'disable_memory'?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof EntityAssistant
     */
    'disable_web_browsing'?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof EntityAssistant
     */
    'enable_memory_for_assistant_api'?: boolean;
    /**
     * Id        schema.EntityId `gorm:\"primarykey\" json:\"id,string\"`
     * @type {number}
     * @memberof EntityAssistant
     */
    'id'?: number;
    /**
     * 
     * @type {number}
     * @memberof EntityAssistant
     */
    'library_id'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityAssistant
     */
    'name'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityAssistant
     */
    'prompt'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof EntityAssistant
     */
    'public'?: boolean;
    /**
     * 
     * @type {number}
     * @memberof EntityAssistant
     */
    'temperature'?: number;
    /**
     * 
     * @type {number}
     * @memberof EntityAssistant
     */
    'total_token_usage'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityAssistant
     */
    'updated_at'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityAssistant
     */
    'user_id'?: string;
}
/**
 * 
 * @export
 * @interface EntityAssistantKey
 */
export interface EntityAssistantKey {
    /**
     * 
     * @type {EntityAssistant}
     * @memberof EntityAssistantKey
     */
    'assistant'?: EntityAssistant;
    /**
     * 
     * @type {number}
     * @memberof EntityAssistantKey
     */
    'assistant_id'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityAssistantKey
     */
    'created_at'?: string;
    /**
     * Id        schema.EntityId `gorm:\"primarykey\" json:\"id,string\"`
     * @type {number}
     * @memberof EntityAssistantKey
     */
    'id'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityAssistantKey
     */
    'secret'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityAssistantKey
     */
    'updated_at'?: string;
}
/**
 * 
 * @export
 * @interface EntityAssistantTool
 */
export interface EntityAssistantTool {
    /**
     * 
     * @type {EntityAssistant}
     * @memberof EntityAssistantTool
     */
    'assistant'?: EntityAssistant;
    /**
     * 
     * @type {number}
     * @memberof EntityAssistantTool
     */
    'assistant_id'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityAssistantTool
     */
    'created_at'?: string;
    /**
     * Id        schema.EntityId `gorm:\"primarykey\" json:\"id,string\"`
     * @type {number}
     * @memberof EntityAssistantTool
     */
    'id'?: number;
    /**
     * 
     * @type {EntityTool}
     * @memberof EntityAssistantTool
     */
    'tool'?: EntityTool;
    /**
     * 
     * @type {number}
     * @memberof EntityAssistantTool
     */
    'tool_id'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityAssistantTool
     */
    'updated_at'?: string;
}
/**
 * 
 * @export
 * @interface EntityChat
 */
export interface EntityChat {
    /**
     * 
     * @type {number}
     * @memberof EntityChat
     */
    'assistant_id'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityChat
     */
    'created_at'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityChat
     */
    'expired_at'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityChat
     */
    'guest_id'?: string;
    /**
     * Id        schema.EntityId `gorm:\"primarykey\" json:\"id,string\"`
     * @type {number}
     * @memberof EntityChat
     */
    'id'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityChat
     */
    'name'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityChat
     */
    'owner'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityChat
     */
    'prompt'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityChat
     */
    'updated_at'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityChat
     */
    'user_id'?: string;
}
/**
 * 
 * @export
 * @interface EntityChatMessage
 */
export interface EntityChatMessage {
    /**
     * 
     * @type {EntityAssistant}
     * @memberof EntityChatMessage
     */
    'assistant'?: EntityAssistant;
    /**
     * AssistantId 可以让同一个对话中，使用不同的助手来处理消息
     * @type {number}
     * @memberof EntityChatMessage
     */
    'assistant_id'?: number;
    /**
     * 
     * @type {number}
     * @memberof EntityChatMessage
     */
    'chat_id'?: number;
    /**
     * 
     * @type {number}
     * @memberof EntityChatMessage
     */
    'completion_tokens'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityChatMessage
     */
    'content'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityChatMessage
     */
    'created_at'?: string;
    /**
     * 
     * @type {EntityFile}
     * @memberof EntityChatMessage
     */
    'file'?: EntityFile;
    /**
     * FileId
     * @type {number}
     * @memberof EntityChatMessage
     */
    'file_id'?: number;
    /**
     * UserFileId       *schema.EntityId `json:\"user_file_id\"` UserFile         *UserFile        `json:\"user_file\"`
     * @type {boolean}
     * @memberof EntityChatMessage
     */
    'hidden'?: boolean;
    /**
     * Id        schema.EntityId `gorm:\"primarykey\" json:\"id,string\"`
     * @type {number}
     * @memberof EntityChatMessage
     */
    'id'?: number;
    /**
     * 
     * @type {number}
     * @memberof EntityChatMessage
     */
    'prompt_tokens'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityChatMessage
     */
    'role'?: string;
    /**
     * 
     * @type {number}
     * @memberof EntityChatMessage
     */
    'total_tokens'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityChatMessage
     */
    'updated_at'?: string;
}
/**
 * 
 * @export
 * @interface EntityChatMessageList
 */
export interface EntityChatMessageList {
    /**
     * 
     * @type {EntityChatMessageListAssistant}
     * @memberof EntityChatMessageList
     */
    'assistant'?: EntityChatMessageListAssistant;
    /**
     * 
     * @type {number}
     * @memberof EntityChatMessageList
     */
    'assistant_id'?: number;
    /**
     * 
     * @type {number}
     * @memberof EntityChatMessageList
     */
    'chat_id'?: number;
    /**
     * 
     * @type {number}
     * @memberof EntityChatMessageList
     */
    'completion_tokens'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityChatMessageList
     */
    'content'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityChatMessageList
     */
    'created_at'?: string;
    /**
     * 
     * @type {EntityFile}
     * @memberof EntityChatMessageList
     */
    'file'?: EntityFile;
    /**
     * 
     * @type {number}
     * @memberof EntityChatMessageList
     */
    'file_id'?: number;
    /**
     * UserFileId       *schema.EntityId `json:\"user_file_id\"` UserFile         *UserFile        `json:\"user_file\"`
     * @type {boolean}
     * @memberof EntityChatMessageList
     */
    'hidden'?: boolean;
    /**
     * 
     * @type {number}
     * @memberof EntityChatMessageList
     */
    'id'?: number;
    /**
     * 
     * @type {number}
     * @memberof EntityChatMessageList
     */
    'prompt_tokens'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityChatMessageList
     */
    'role'?: string;
    /**
     * 
     * @type {number}
     * @memberof EntityChatMessageList
     */
    'total_tokens'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityChatMessageList
     */
    'updated_at'?: string;
}
/**
 * 
 * @export
 * @interface EntityChatMessageListAssistant
 */
export interface EntityChatMessageListAssistant {
    /**
     * 
     * @type {number}
     * @memberof EntityChatMessageListAssistant
     */
    'id'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityChatMessageListAssistant
     */
    'name'?: string;
}
/**
 * 
 * @export
 * @interface EntityDocument
 */
export interface EntityDocument {
    /**
     * 
     * @type {boolean}
     * @memberof EntityDocument
     */
    'chunked'?: boolean;
    /**
     * 
     * @type {string}
     * @memberof EntityDocument
     */
    'created_at'?: string;
    /**
     * Id        schema.EntityId `gorm:\"primarykey\" json:\"id,string\"`
     * @type {number}
     * @memberof EntityDocument
     */
    'id'?: number;
    /**
     * 
     * @type {EntityLibrary}
     * @memberof EntityDocument
     */
    'library'?: EntityLibrary;
    /**
     * 
     * @type {number}
     * @memberof EntityDocument
     */
    'library_id'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityDocument
     */
    'name'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityDocument
     */
    'updated_at'?: string;
}
/**
 * 
 * @export
 * @interface EntityFile
 */
export interface EntityFile {
    /**
     * 
     * @type {string}
     * @memberof EntityFile
     */
    'created_at'?: string;
    /**
     * Public   bool    `json:\"public\"` // 是否公开，访客上传的文件应始终公开，或归属于所有者 TODO: 移除 file 的到期时间，如果当 file 没有任何引用的时候再删除 因为有外键，所以直接删除是删不掉的，必须删除消息
     * @type {string}
     * @memberof EntityFile
     */
    'expired_at'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityFile
     */
    'file_hash'?: string;
    /**
     * Id        schema.EntityId `gorm:\"primarykey\" json:\"id,string\"`
     * @type {number}
     * @memberof EntityFile
     */
    'id'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityFile
     */
    'mime_type'?: string;
    /**
     * 
     * @type {number}
     * @memberof EntityFile
     */
    'size'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityFile
     */
    'updated_at'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityFile
     */
    'url'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityFile
     */
    'url_hash'?: string;
}
/**
 * 
 * @export
 * @interface EntityLibrary
 */
export interface EntityLibrary {
    /**
     * 
     * @type {string}
     * @memberof EntityLibrary
     */
    'created_at'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof EntityLibrary
     */
    'default'?: boolean;
    /**
     * 
     * @type {string}
     * @memberof EntityLibrary
     */
    'description'?: string;
    /**
     * 
     * @type {Array<EntityDocument>}
     * @memberof EntityLibrary
     */
    'documents'?: Array<EntityDocument>;
    /**
     * Id        schema.EntityId `gorm:\"primarykey\" json:\"id,string\"`
     * @type {number}
     * @memberof EntityLibrary
     */
    'id'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityLibrary
     */
    'name'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityLibrary
     */
    'updated_at'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityLibrary
     */
    'user_id'?: string;
}
/**
 * 
 * @export
 * @interface EntityMemory
 */
export interface EntityMemory {
    /**
     * 
     * @type {string}
     * @memberof EntityMemory
     */
    'content'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityMemory
     */
    'created_at'?: string;
    /**
     * Id        schema.EntityId `gorm:\"primarykey\" json:\"id,string\"`
     * @type {number}
     * @memberof EntityMemory
     */
    'id'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityMemory
     */
    'updated_at'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityMemory
     */
    'user_id'?: string;
}
/**
 * 
 * @export
 * @interface EntityTool
 */
export interface EntityTool {
    /**
     * 
     * @type {string}
     * @memberof EntityTool
     */
    'api_key'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityTool
     */
    'created_at'?: string;
    /**
     * 
     * @type {SchemaToolDiscoveryOutput}
     * @memberof EntityTool
     */
    'data'?: SchemaToolDiscoveryOutput;
    /**
     * 
     * @type {string}
     * @memberof EntityTool
     */
    'description'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityTool
     */
    'discovery_url'?: string;
    /**
     * Id        schema.EntityId `gorm:\"primarykey\" json:\"id,string\"`
     * @type {number}
     * @memberof EntityTool
     */
    'id'?: number;
    /**
     * 
     * @type {string}
     * @memberof EntityTool
     */
    'name'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityTool
     */
    'updated_at'?: string;
    /**
     * 
     * @type {string}
     * @memberof EntityTool
     */
    'user_id'?: string;
}
/**
 * 
 * @export
 * @interface PagePagedResultSchemaAssistantPublic
 */
export interface PagePagedResultSchemaAssistantPublic {
    /**
     * 
     * @type {Array<SchemaAssistantPublic>}
     * @memberof PagePagedResultSchemaAssistantPublic
     */
    'data'?: Array<SchemaAssistantPublic>;
    /**
     * 当前页码
     * @type {number}
     * @memberof PagePagedResultSchemaAssistantPublic
     */
    'page'?: number;
    /**
     * 每页大小
     * @type {number}
     * @memberof PagePagedResultSchemaAssistantPublic
     */
    'page_size'?: number;
    /**
     * 数据总条数
     * @type {number}
     * @memberof PagePagedResultSchemaAssistantPublic
     */
    'total_count'?: number;
    /**
     * 总页数
     * @type {number}
     * @memberof PagePagedResultSchemaAssistantPublic
     */
    'total_pages'?: number;
}
/**
 * 
 * @export
 * @interface SchemaAddPublicChatMessageRequest
 */
export interface SchemaAddPublicChatMessageRequest {
    /**
     * 
     * @type {string}
     * @memberof SchemaAddPublicChatMessageRequest
     */
    'assistant_key': string;
    /**
     * 
     * @type {string}
     * @memberof SchemaAddPublicChatMessageRequest
     */
    'guest_id': string;
    /**
     * 
     * @type {string}
     * @memberof SchemaAddPublicChatMessageRequest
     */
    'message': string;
    /**
     * 
     * @type {string}
     * @memberof SchemaAddPublicChatMessageRequest
     */
    'role': SchemaAddPublicChatMessageRequestRoleEnum;
}

export const SchemaAddPublicChatMessageRequestRoleEnum = {
    User: 'user',
    UserHide: 'user_hide',
    System: 'system',
    SystemHide: 'system_hide',
    Assistant: 'assistant',
    SystemOverride: 'system_override',
    UserLater: 'user_later'
} as const;

export type SchemaAddPublicChatMessageRequestRoleEnum = typeof SchemaAddPublicChatMessageRequestRoleEnum[keyof typeof SchemaAddPublicChatMessageRequestRoleEnum];

/**
 * 
 * @export
 * @interface SchemaAssistantCreateRequest
 */
export interface SchemaAssistantCreateRequest {
    /**
     * 
     * @type {string}
     * @memberof SchemaAssistantCreateRequest
     */
    'description': string;
    /**
     * 
     * @type {boolean}
     * @memberof SchemaAssistantCreateRequest
     */
    'disable_default_prompt'?: boolean;
    /**
     * 
     * @type {string}
     * @memberof SchemaAssistantCreateRequest
     */
    'name': string;
    /**
     * 
     * @type {string}
     * @memberof SchemaAssistantCreateRequest
     */
    'prompt'?: string;
    /**
     * 
     * @type {number}
     * @memberof SchemaAssistantCreateRequest
     */
    'temperature'?: number;
}
/**
 * 
 * @export
 * @interface SchemaAssistantLibraryRequest
 */
export interface SchemaAssistantLibraryRequest {
    /**
     * 
     * @type {number}
     * @memberof SchemaAssistantLibraryRequest
     */
    'library_id': number;
}
/**
 * 
 * @export
 * @interface SchemaAssistantPublic
 */
export interface SchemaAssistantPublic {
    /**
     * 
     * @type {string}
     * @memberof SchemaAssistantPublic
     */
    'description'?: string;
    /**
     * 
     * @type {number}
     * @memberof SchemaAssistantPublic
     */
    'id'?: number;
    /**
     * 
     * @type {string}
     * @memberof SchemaAssistantPublic
     */
    'name'?: string;
}
/**
 * 
 * @export
 * @interface SchemaAssistantUpdateRequest
 */
export interface SchemaAssistantUpdateRequest {
    /**
     * 
     * @type {string}
     * @memberof SchemaAssistantUpdateRequest
     */
    'description'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof SchemaAssistantUpdateRequest
     */
    'disable_default_prompt'?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof SchemaAssistantUpdateRequest
     */
    'disable_internet_search'?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof SchemaAssistantUpdateRequest
     */
    'disable_memory'?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof SchemaAssistantUpdateRequest
     */
    'disable_web_browsing'?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof SchemaAssistantUpdateRequest
     */
    'enable_memory_for_assistant_api'?: boolean;
    /**
     * 
     * @type {number}
     * @memberof SchemaAssistantUpdateRequest
     */
    'library_id'?: number;
    /**
     * 
     * @type {string}
     * @memberof SchemaAssistantUpdateRequest
     */
    'name'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaAssistantUpdateRequest
     */
    'prompt'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof SchemaAssistantUpdateRequest
     */
    'public'?: boolean;
    /**
     * 
     * @type {number}
     * @memberof SchemaAssistantUpdateRequest
     */
    'temperature'?: number;
}
/**
 * 
 * @export
 * @interface SchemaChatCreateRequest
 */
export interface SchemaChatCreateRequest {
    /**
     * 
     * @type {number}
     * @memberof SchemaChatCreateRequest
     */
    'assistant_id'?: number;
    /**
     * 
     * @type {SchemaCustomTime}
     * @memberof SchemaChatCreateRequest
     */
    'expired_at'?: SchemaCustomTime;
    /**
     * 
     * @type {string}
     * @memberof SchemaChatCreateRequest
     */
    'name': string;
    /**
     * 
     * @type {string}
     * @memberof SchemaChatCreateRequest
     */
    'prompt'?: string;
}
/**
 * 
 * @export
 * @interface SchemaChatMessageAddRequest
 */
export interface SchemaChatMessageAddRequest {
    /**
     * 
     * @type {number}
     * @memberof SchemaChatMessageAddRequest
     */
    'assistant_id'?: number;
    /**
     * 
     * @type {string}
     * @memberof SchemaChatMessageAddRequest
     */
    'message': string;
    /**
     * 
     * @type {string}
     * @memberof SchemaChatMessageAddRequest
     */
    'role': SchemaChatMessageAddRequestRoleEnum;
    /**
     * 
     * @type {{ [key: string]: string; }}
     * @memberof SchemaChatMessageAddRequest
     */
    'variables'?: { [key: string]: string; };
}

export const SchemaChatMessageAddRequestRoleEnum = {
    User: 'user',
    UserHide: 'user_hide',
    System: 'system',
    SystemHide: 'system_hide',
    Assistant: 'assistant',
    SystemOverride: 'system_override',
    UserLater: 'user_later'
} as const;

export type SchemaChatMessageAddRequestRoleEnum = typeof SchemaChatMessageAddRequestRoleEnum[keyof typeof SchemaChatMessageAddRequestRoleEnum];

/**
 * 
 * @export
 * @interface SchemaChatMessageResponse
 */
export interface SchemaChatMessageResponse {
    /**
     * 
     * @type {boolean}
     * @memberof SchemaChatMessageResponse
     */
    'stream'?: boolean;
    /**
     * 
     * @type {string}
     * @memberof SchemaChatMessageResponse
     */
    'stream_id'?: string;
}
/**
 * 
 * @export
 * @interface SchemaChatPublicListRequest
 */
export interface SchemaChatPublicListRequest {
    /**
     * 
     * @type {string}
     * @memberof SchemaChatPublicListRequest
     */
    'guest_id': string;
}
/**
 * 
 * @export
 * @interface SchemaChatPublicRequest
 */
export interface SchemaChatPublicRequest {
    /**
     * 
     * @type {string}
     * @memberof SchemaChatPublicRequest
     */
    'assistant_key': string;
    /**
     * 
     * @type {string}
     * @memberof SchemaChatPublicRequest
     */
    'guest_id': string;
    /**
     * 
     * @type {string}
     * @memberof SchemaChatPublicRequest
     */
    'name': string;
}
/**
 * 
 * @export
 * @interface SchemaChatUpdateRequest
 */
export interface SchemaChatUpdateRequest {
    /**
     * 
     * @type {number}
     * @memberof SchemaChatUpdateRequest
     */
    'assistant_id'?: number;
    /**
     * 
     * @type {SchemaCustomTime}
     * @memberof SchemaChatUpdateRequest
     */
    'expired_at'?: SchemaCustomTime;
    /**
     * 
     * @type {string}
     * @memberof SchemaChatUpdateRequest
     */
    'name': string;
    /**
     * 
     * @type {string}
     * @memberof SchemaChatUpdateRequest
     */
    'prompt'?: string;
}
/**
 * 
 * @export
 * @interface SchemaCurrentUserResponse
 */
export interface SchemaCurrentUserResponse {
    /**
     * 
     * @type {string}
     * @memberof SchemaCurrentUserResponse
     */
    'ip'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaCurrentUserResponse
     */
    'userEmail'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaCurrentUserResponse
     */
    'userId'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaCurrentUserResponse
     */
    'userName'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof SchemaCurrentUserResponse
     */
    'valid'?: boolean;
}
/**
 * 
 * @export
 * @interface SchemaCustomTime
 */
export interface SchemaCustomTime {
    /**
     * 
     * @type {string}
     * @memberof SchemaCustomTime
     */
    'time.Time'?: string;
}
/**
 * 
 * @export
 * @interface SchemaDocumentCreateRequest
 */
export interface SchemaDocumentCreateRequest {
    /**
     * 
     * @type {string}
     * @memberof SchemaDocumentCreateRequest
     */
    'content': string;
    /**
     * 
     * @type {string}
     * @memberof SchemaDocumentCreateRequest
     */
    'name': string;
}
/**
 * 
 * @export
 * @interface SchemaFunctionsInput
 */
export interface SchemaFunctionsInput {
    /**
     * 
     * @type {string}
     * @memberof SchemaFunctionsInput
     */
    'description': string;
    /**
     * 
     * @type {string}
     * @memberof SchemaFunctionsInput
     */
    'name': string;
    /**
     * 
     * @type {SchemaToolDiscoveryOutputFunctionParameters}
     * @memberof SchemaFunctionsInput
     */
    'parameters': SchemaToolDiscoveryOutputFunctionParameters;
}
/**
 * 
 * @export
 * @interface SchemaGetPublicChatMessageRequest
 */
export interface SchemaGetPublicChatMessageRequest {
    /**
     * 
     * @type {string}
     * @memberof SchemaGetPublicChatMessageRequest
     */
    'assistant_key': string;
    /**
     * 
     * @type {string}
     * @memberof SchemaGetPublicChatMessageRequest
     */
    'guest_id': string;
}
/**
 * 
 * @export
 * @interface SchemaLibraryCreateRequest
 */
export interface SchemaLibraryCreateRequest {
    /**
     * 
     * @type {string}
     * @memberof SchemaLibraryCreateRequest
     */
    'description'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaLibraryCreateRequest
     */
    'name': string;
}
/**
 * 
 * @export
 * @interface SchemaLibraryUpdateRequest
 */
export interface SchemaLibraryUpdateRequest {
    /**
     * 
     * @type {boolean}
     * @memberof SchemaLibraryUpdateRequest
     */
    'default'?: boolean;
    /**
     * 
     * @type {string}
     * @memberof SchemaLibraryUpdateRequest
     */
    'description'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaLibraryUpdateRequest
     */
    'name': string;
}
/**
 * 
 * @export
 * @interface SchemaOpenAIChatCompletionRequest
 */
export interface SchemaOpenAIChatCompletionRequest {
    /**
     * Optional
     * @type {number}
     * @memberof SchemaOpenAIChatCompletionRequest
     */
    'max_tokens'?: number;
    /**
     * Required
     * @type {Array<SchemaOpenAIChatCompletionRequestMessage>}
     * @memberof SchemaOpenAIChatCompletionRequest
     */
    'messages'?: Array<SchemaOpenAIChatCompletionRequestMessage>;
    /**
     * Required
     * @type {string}
     * @memberof SchemaOpenAIChatCompletionRequest
     */
    'model'?: string;
    /**
     * Optional
     * @type {number}
     * @memberof SchemaOpenAIChatCompletionRequest
     */
    'n'?: number;
    /**
     * Optional
     * @type {boolean}
     * @memberof SchemaOpenAIChatCompletionRequest
     */
    'stream'?: boolean;
    /**
     * Optional
     * @type {number}
     * @memberof SchemaOpenAIChatCompletionRequest
     */
    'temperature'?: number;
    /**
     * Optional
     * @type {number}
     * @memberof SchemaOpenAIChatCompletionRequest
     */
    'top_p'?: number;
}
/**
 * 
 * @export
 * @interface SchemaOpenAIChatCompletionRequestMessage
 */
export interface SchemaOpenAIChatCompletionRequestMessage {
    /**
     * Required
     * @type {object}
     * @memberof SchemaOpenAIChatCompletionRequestMessage
     */
    'content'?: object;
    /**
     * 
     * @type {SchemaOpenAIImageUrl}
     * @memberof SchemaOpenAIChatCompletionRequestMessage
     */
    'image_url'?: SchemaOpenAIImageUrl;
    /**
     * Required
     * @type {string}
     * @memberof SchemaOpenAIChatCompletionRequestMessage
     */
    'role'?: string;
}
/**
 * 
 * @export
 * @interface SchemaOpenAIChatCompletionResponse
 */
export interface SchemaOpenAIChatCompletionResponse {
    /**
     * 
     * @type {Array<SchemaOpenAIChatCompletionResponseChoice>}
     * @memberof SchemaOpenAIChatCompletionResponse
     */
    'choices'?: Array<SchemaOpenAIChatCompletionResponseChoice>;
    /**
     * 
     * @type {number}
     * @memberof SchemaOpenAIChatCompletionResponse
     */
    'created'?: number;
    /**
     * 
     * @type {string}
     * @memberof SchemaOpenAIChatCompletionResponse
     */
    'id'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaOpenAIChatCompletionResponse
     */
    'model'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaOpenAIChatCompletionResponse
     */
    'object'?: string;
    /**
     * 
     * @type {SchemaTokenUsage}
     * @memberof SchemaOpenAIChatCompletionResponse
     */
    'usage'?: SchemaTokenUsage;
}
/**
 * 
 * @export
 * @interface SchemaOpenAIChatCompletionResponseChoice
 */
export interface SchemaOpenAIChatCompletionResponseChoice {
    /**
     * 
     * @type {number}
     * @memberof SchemaOpenAIChatCompletionResponseChoice
     */
    'index'?: number;
    /**
     * 
     * @type {SchemaOpenAIChatCompletionRequestMessage}
     * @memberof SchemaOpenAIChatCompletionResponseChoice
     */
    'message'?: SchemaOpenAIChatCompletionRequestMessage;
}
/**
 * 
 * @export
 * @interface SchemaOpenAIImageUrl
 */
export interface SchemaOpenAIImageUrl {
    /**
     * 
     * @type {string}
     * @memberof SchemaOpenAIImageUrl
     */
    'detail'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaOpenAIImageUrl
     */
    'url'?: string;
}
/**
 * 
 * @export
 * @interface SchemaResponseBody
 */
export interface SchemaResponseBody {
    /**
     * 
     * @type {object}
     * @memberof SchemaResponseBody
     */
    'data'?: object;
    /**
     * 
     * @type {string}
     * @memberof SchemaResponseBody
     */
    'error'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaResponseBody
     */
    'message'?: string;
    /**
     * 
     * @type {boolean}
     * @memberof SchemaResponseBody
     */
    'success'?: boolean;
}
/**
 * 
 * @export
 * @interface SchemaSiteUsageResponse
 */
export interface SchemaSiteUsageResponse {
    /**
     * 
     * @type {number}
     * @memberof SchemaSiteUsageResponse
     */
    'month_tokens'?: number;
    /**
     * 
     * @type {number}
     * @memberof SchemaSiteUsageResponse
     */
    'month_tool_calls'?: number;
}
/**
 * 
 * @export
 * @interface SchemaTokenUsage
 */
export interface SchemaTokenUsage {
    /**
     * 
     * @type {number}
     * @memberof SchemaTokenUsage
     */
    'completion_tokens'?: number;
    /**
     * 
     * @type {number}
     * @memberof SchemaTokenUsage
     */
    'prompt_tokens'?: number;
    /**
     * 
     * @type {number}
     * @memberof SchemaTokenUsage
     */
    'total_tokens'?: number;
}
/**
 * 
 * @export
 * @interface SchemaToolCreateRequest
 */
export interface SchemaToolCreateRequest {
    /**
     * 
     * @type {string}
     * @memberof SchemaToolCreateRequest
     */
    'api_key'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaToolCreateRequest
     */
    'description': string;
    /**
     * 
     * @type {string}
     * @memberof SchemaToolCreateRequest
     */
    'discovery_url': string;
    /**
     * 
     * @type {string}
     * @memberof SchemaToolCreateRequest
     */
    'name': string;
}
/**
 * 
 * @export
 * @interface SchemaToolDiscoveryInput
 */
export interface SchemaToolDiscoveryInput {
    /**
     * 
     * @type {string}
     * @memberof SchemaToolDiscoveryInput
     */
    'callback_url'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaToolDiscoveryInput
     */
    'description': string;
    /**
     * 
     * @type {Array<SchemaFunctionsInput>}
     * @memberof SchemaToolDiscoveryInput
     */
    'functions'?: Array<SchemaFunctionsInput>;
    /**
     * 
     * @type {string}
     * @memberof SchemaToolDiscoveryInput
     */
    'homepage_url'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaToolDiscoveryInput
     */
    'name': string;
}
/**
 * 
 * @export
 * @interface SchemaToolDiscoveryOutput
 */
export interface SchemaToolDiscoveryOutput {
    /**
     * 
     * @type {string}
     * @memberof SchemaToolDiscoveryOutput
     */
    'callback_url'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaToolDiscoveryOutput
     */
    'description'?: string;
    /**
     * 
     * @type {Array<SchemaToolDiscoveryOutputFunctions>}
     * @memberof SchemaToolDiscoveryOutput
     */
    'function'?: Array<SchemaToolDiscoveryOutputFunctions>;
    /**
     * 
     * @type {string}
     * @memberof SchemaToolDiscoveryOutput
     */
    'homepage_url'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaToolDiscoveryOutput
     */
    'name'?: string;
}
/**
 * 
 * @export
 * @interface SchemaToolDiscoveryOutputFunction
 */
export interface SchemaToolDiscoveryOutputFunction {
    /**
     * 
     * @type {string}
     * @memberof SchemaToolDiscoveryOutputFunction
     */
    'description'?: string;
    /**
     * 
     * @type {string}
     * @memberof SchemaToolDiscoveryOutputFunction
     */
    'name'?: string;
    /**
     * 
     * @type {SchemaToolDiscoveryOutputFunctionParameters}
     * @memberof SchemaToolDiscoveryOutputFunction
     */
    'parameters'?: SchemaToolDiscoveryOutputFunctionParameters;
}
/**
 * 
 * @export
 * @interface SchemaToolDiscoveryOutputFunctionParameters
 */
export interface SchemaToolDiscoveryOutputFunctionParameters {
    /**
     * 
     * @type {object}
     * @memberof SchemaToolDiscoveryOutputFunctionParameters
     */
    'properties': object;
    /**
     * 
     * @type {Array<string>}
     * @memberof SchemaToolDiscoveryOutputFunctionParameters
     */
    'required': Array<string>;
    /**
     * 
     * @type {string}
     * @memberof SchemaToolDiscoveryOutputFunctionParameters
     */
    'type': string;
}
/**
 * 
 * @export
 * @interface SchemaToolDiscoveryOutputFunctions
 */
export interface SchemaToolDiscoveryOutputFunctions {
    /**
     * 
     * @type {Array<SchemaToolDiscoveryOutputFunction>}
     * @memberof SchemaToolDiscoveryOutputFunctions
     */
    'functions'?: Array<SchemaToolDiscoveryOutputFunction>;
    /**
     * 
     * @type {string}
     * @memberof SchemaToolDiscoveryOutputFunctions
     */
    'type'?: string;
}

/**
 * AssistantApi - axios parameter creator
 * @export
 */
export const AssistantApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary 收藏的助理列表
         * @param {number} [page] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsFavoritesGet: async (page?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/v1/assistants/favorites`;
            // 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)

            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }


    
            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 {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/v1/assistants`;
            // 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,
            };
        },
        /**
         * 
         * @summary 删除 Assistant
         * @param {number} id Assistant ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdDelete: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1AssistantsIdDelete', 'id', id)
            const localVarPath = `/api/v1/assistants/{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 获取指定的 Assistant
         * @param {number} id Assistant ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdGet: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1AssistantsIdGet', 'id', id)
            const localVarPath = `/api/v1/assistants/{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: '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 可以创建一个 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary 解绑资料库
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdLibraryDelete: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1AssistantsIdLibraryDelete', 'id', id)
            const localVarPath = `/api/v1/assistants/{id}/library`
                .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 绑定资料库
         * @param {number} id 
         * @param {SchemaAssistantLibraryRequest} assistantLibraryRequest AssistantLibraryRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdLibraryPost: async (id: number, assistantLibraryRequest: SchemaAssistantLibraryRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1AssistantsIdLibraryPost', 'id', id)
            // verify required parameter 'assistantLibraryRequest' is not null or undefined
            assertParamExists('apiV1AssistantsIdLibraryPost', 'assistantLibraryRequest', assistantLibraryRequest)
            const localVarPath = `/api/v1/assistants/{id}/library`
                .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)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(assistantLibraryRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary 更新 Assistant
         * @param {number} id Assistant ID
         * @param {SchemaAssistantUpdateRequest} assistantUpdateRequest Assistant Update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdPut: async (id: number, assistantUpdateRequest: SchemaAssistantUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1AssistantsIdPut', 'id', id)
            // verify required parameter 'assistantUpdateRequest' is not null or undefined
            assertParamExists('apiV1AssistantsIdPut', 'assistantUpdateRequest', assistantUpdateRequest)
            const localVarPath = `/api/v1/assistants/{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: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication ApiKeyAuth required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(assistantUpdateRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary 获取 Assistant 所绑定的 Tool
         * @param {number} id Assistant ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdToolsGet: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1AssistantsIdToolsGet', 'id', id)
            const localVarPath = `/api/v1/assistants/{id}/tools`
                .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,
            };
        },
        /**
         * 
         * @summary 解绑 Tool
         * @param {number} id Assistant ID
         * @param {number} toolId Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdToolsToolIdDelete: async (id: number, toolId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1AssistantsIdToolsToolIdDelete', 'id', id)
            // verify required parameter 'toolId' is not null or undefined
            assertParamExists('apiV1AssistantsIdToolsToolIdDelete', 'toolId', toolId)
            const localVarPath = `/api/v1/assistants/{id}/tools/{tool_id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)))
                .replace(`{${"tool_id"}}`, encodeURIComponent(String(toolId)));
            // 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 绑定 Tool
         * @param {number} id Assistant ID
         * @param {number} toolId Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdToolsToolIdPost: async (id: number, toolId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1AssistantsIdToolsToolIdPost', 'id', id)
            // verify required parameter 'toolId' is not null or undefined
            assertParamExists('apiV1AssistantsIdToolsToolIdPost', 'toolId', toolId)
            const localVarPath = `/api/v1/assistants/{id}/tools/{tool_id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)))
                .replace(`{${"tool_id"}}`, encodeURIComponent(String(toolId)));
            // 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 {SchemaAssistantCreateRequest} assistant Assistant
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsPost: async (assistant: SchemaAssistantCreateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'assistant' is not null or undefined
            assertParamExists('apiV1AssistantsPost', 'assistant', assistant)
            const localVarPath = `/api/v1/assistants`;
            // 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)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(assistant, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary 获取公开的助理列表
         * @param {number} [page] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsPublicGet: async (page?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/v1/assistants/public`;
            // 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)

            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary 取消收藏助理
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsPublicIdDelete: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1AssistantsPublicIdDelete', 'id', id)
            const localVarPath = `/api/v1/assistants/public/{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 收藏助理
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsPublicIdPost: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1AssistantsPublicIdPost', 'id', id)
            const localVarPath = `/api/v1/assistants/public/{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: '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,
            };
        },
    }
};

/**
 * AssistantApi - functional programming interface
 * @export
 */
export const AssistantApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = AssistantApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary 收藏的助理列表
         * @param {number} [page] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1AssistantsFavoritesGet(page?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsFavoritesGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsFavoritesGet(page, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsFavoritesGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 获取 Assistant 列表
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1AssistantsGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsGet(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 删除 Assistant
         * @param {number} id Assistant ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1AssistantsIdDelete(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdDelete(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdDelete']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 获取指定的 Assistant
         * @param {number} id Assistant ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1AssistantsIdGet(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdGet(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            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<ApiV1AssistantsIdKeysGet200Response>> {
            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<SchemaResponseBody>> {
            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<ApiV1AssistantsIdKeysPost200Response>> {
            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 解绑资料库
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1AssistantsIdLibraryDelete(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdLibraryDelete(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdLibraryDelete']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 绑定资料库
         * @param {number} id 
         * @param {SchemaAssistantLibraryRequest} assistantLibraryRequest AssistantLibraryRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1AssistantsIdLibraryPost(id: number, assistantLibraryRequest: SchemaAssistantLibraryRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdLibraryPost(id, assistantLibraryRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdLibraryPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 更新 Assistant
         * @param {number} id Assistant ID
         * @param {SchemaAssistantUpdateRequest} assistantUpdateRequest Assistant Update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1AssistantsIdPut(id: number, assistantUpdateRequest: SchemaAssistantUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdPut(id, assistantUpdateRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdPut']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 获取 Assistant 所绑定的 Tool
         * @param {number} id Assistant ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1AssistantsIdToolsGet(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsIdToolsGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdToolsGet(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdToolsGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 解绑 Tool
         * @param {number} id Assistant ID
         * @param {number} toolId Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1AssistantsIdToolsToolIdDelete(id: number, toolId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsIdToolsToolIdPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdToolsToolIdDelete(id, toolId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdToolsToolIdDelete']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 绑定 Tool
         * @param {number} id Assistant ID
         * @param {number} toolId Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1AssistantsIdToolsToolIdPost(id: number, toolId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsIdToolsToolIdPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdToolsToolIdPost(id, toolId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdToolsToolIdPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 创建 Assistant
         * @param {SchemaAssistantCreateRequest} assistant Assistant
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1AssistantsPost(assistant: SchemaAssistantCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsPost(assistant, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 获取公开的助理列表
         * @param {number} [page] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1AssistantsPublicGet(page?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsFavoritesGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsPublicGet(page, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsPublicGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 取消收藏助理
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1AssistantsPublicIdDelete(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsPublicIdPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsPublicIdDelete(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsPublicIdDelete']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 收藏助理
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1AssistantsPublicIdPost(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsPublicIdPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsPublicIdPost(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsPublicIdPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * AssistantApi - factory interface
 * @export
 */
export const AssistantApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = AssistantApiFp(configuration)
    return {
        /**
         * 
         * @summary 收藏的助理列表
         * @param {number} [page] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsFavoritesGet(page?: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsFavoritesGet200Response> {
            return localVarFp.apiV1AssistantsFavoritesGet(page, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 获取 Assistant 列表
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsGet(options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsGet200Response> {
            return localVarFp.apiV1AssistantsGet(options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 删除 Assistant
         * @param {number} id Assistant ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdDelete(id: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.apiV1AssistantsIdDelete(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 获取指定的 Assistant
         * @param {number} id Assistant ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsPost200Response> {
            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<ApiV1AssistantsIdKeysGet200Response> {
            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<SchemaResponseBody> {
            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<ApiV1AssistantsIdKeysPost200Response> {
            return localVarFp.apiV1AssistantsIdKeysPost(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 解绑资料库
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdLibraryDelete(id: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.apiV1AssistantsIdLibraryDelete(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 绑定资料库
         * @param {number} id 
         * @param {SchemaAssistantLibraryRequest} assistantLibraryRequest AssistantLibraryRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdLibraryPost(id: number, assistantLibraryRequest: SchemaAssistantLibraryRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.apiV1AssistantsIdLibraryPost(id, assistantLibraryRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 更新 Assistant
         * @param {number} id Assistant ID
         * @param {SchemaAssistantUpdateRequest} assistantUpdateRequest Assistant Update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdPut(id: number, assistantUpdateRequest: SchemaAssistantUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsPost200Response> {
            return localVarFp.apiV1AssistantsIdPut(id, assistantUpdateRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 获取 Assistant 所绑定的 Tool
         * @param {number} id Assistant ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdToolsGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsIdToolsGet200Response> {
            return localVarFp.apiV1AssistantsIdToolsGet(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 解绑 Tool
         * @param {number} id Assistant ID
         * @param {number} toolId Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdToolsToolIdDelete(id: number, toolId: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsIdToolsToolIdPost200Response> {
            return localVarFp.apiV1AssistantsIdToolsToolIdDelete(id, toolId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 绑定 Tool
         * @param {number} id Assistant ID
         * @param {number} toolId Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsIdToolsToolIdPost(id: number, toolId: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsIdToolsToolIdPost200Response> {
            return localVarFp.apiV1AssistantsIdToolsToolIdPost(id, toolId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 创建 Assistant
         * @param {SchemaAssistantCreateRequest} assistant Assistant
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsPost(assistant: SchemaAssistantCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsPost200Response> {
            return localVarFp.apiV1AssistantsPost(assistant, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 获取公开的助理列表
         * @param {number} [page] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsPublicGet(page?: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsFavoritesGet200Response> {
            return localVarFp.apiV1AssistantsPublicGet(page, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 取消收藏助理
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsPublicIdDelete(id: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsPublicIdPost200Response> {
            return localVarFp.apiV1AssistantsPublicIdDelete(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 收藏助理
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1AssistantsPublicIdPost(id: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsPublicIdPost200Response> {
            return localVarFp.apiV1AssistantsPublicIdPost(id, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * AssistantApi - object-oriented interface
 * @export
 * @class AssistantApi
 * @extends {BaseAPI}
 */
export class AssistantApi extends BaseAPI {
    /**
     * 
     * @summary 收藏的助理列表
     * @param {number} [page] 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AssistantApi
     */
    public apiV1AssistantsFavoritesGet(page?: number, options?: RawAxiosRequestConfig) {
        return AssistantApiFp(this.configuration).apiV1AssistantsFavoritesGet(page, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 获取 Assistant 列表
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AssistantApi
     */
    public apiV1AssistantsGet(options?: RawAxiosRequestConfig) {
        return AssistantApiFp(this.configuration).apiV1AssistantsGet(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 删除 Assistant
     * @param {number} id Assistant ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AssistantApi
     */
    public apiV1AssistantsIdDelete(id: number, options?: RawAxiosRequestConfig) {
        return AssistantApiFp(this.configuration).apiV1AssistantsIdDelete(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 获取指定的 Assistant
     * @param {number} id Assistant ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AssistantApi
     */
    public apiV1AssistantsIdGet(id: number, options?: RawAxiosRequestConfig) {
        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 解绑资料库
     * @param {number} id 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AssistantApi
     */
    public apiV1AssistantsIdLibraryDelete(id: number, options?: RawAxiosRequestConfig) {
        return AssistantApiFp(this.configuration).apiV1AssistantsIdLibraryDelete(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 绑定资料库
     * @param {number} id 
     * @param {SchemaAssistantLibraryRequest} assistantLibraryRequest AssistantLibraryRequest
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AssistantApi
     */
    public apiV1AssistantsIdLibraryPost(id: number, assistantLibraryRequest: SchemaAssistantLibraryRequest, options?: RawAxiosRequestConfig) {
        return AssistantApiFp(this.configuration).apiV1AssistantsIdLibraryPost(id, assistantLibraryRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 更新 Assistant
     * @param {number} id Assistant ID
     * @param {SchemaAssistantUpdateRequest} assistantUpdateRequest Assistant Update
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AssistantApi
     */
    public apiV1AssistantsIdPut(id: number, assistantUpdateRequest: SchemaAssistantUpdateRequest, options?: RawAxiosRequestConfig) {
        return AssistantApiFp(this.configuration).apiV1AssistantsIdPut(id, assistantUpdateRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 获取 Assistant 所绑定的 Tool
     * @param {number} id Assistant ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AssistantApi
     */
    public apiV1AssistantsIdToolsGet(id: number, options?: RawAxiosRequestConfig) {
        return AssistantApiFp(this.configuration).apiV1AssistantsIdToolsGet(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 解绑 Tool
     * @param {number} id Assistant ID
     * @param {number} toolId Tool ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AssistantApi
     */
    public apiV1AssistantsIdToolsToolIdDelete(id: number, toolId: number, options?: RawAxiosRequestConfig) {
        return AssistantApiFp(this.configuration).apiV1AssistantsIdToolsToolIdDelete(id, toolId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 绑定 Tool
     * @param {number} id Assistant ID
     * @param {number} toolId Tool ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AssistantApi
     */
    public apiV1AssistantsIdToolsToolIdPost(id: number, toolId: number, options?: RawAxiosRequestConfig) {
        return AssistantApiFp(this.configuration).apiV1AssistantsIdToolsToolIdPost(id, toolId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 创建 Assistant
     * @param {SchemaAssistantCreateRequest} assistant Assistant
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AssistantApi
     */
    public apiV1AssistantsPost(assistant: SchemaAssistantCreateRequest, options?: RawAxiosRequestConfig) {
        return AssistantApiFp(this.configuration).apiV1AssistantsPost(assistant, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 获取公开的助理列表
     * @param {number} [page] 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AssistantApi
     */
    public apiV1AssistantsPublicGet(page?: number, options?: RawAxiosRequestConfig) {
        return AssistantApiFp(this.configuration).apiV1AssistantsPublicGet(page, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 取消收藏助理
     * @param {number} id 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AssistantApi
     */
    public apiV1AssistantsPublicIdDelete(id: number, options?: RawAxiosRequestConfig) {
        return AssistantApiFp(this.configuration).apiV1AssistantsPublicIdDelete(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 收藏助理
     * @param {number} id 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AssistantApi
     */
    public apiV1AssistantsPublicIdPost(id: number, options?: RawAxiosRequestConfig) {
        return AssistantApiFp(this.configuration).apiV1AssistantsPublicIdPost(id, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * ChatApi - axios parameter creator
 * @export
 */
export const ChatApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 兼容 OpenAI Chat Completion 接口，认证需要使用 Assistant Share Token
         * @summary OpenAI Chat Completion
         * @param {SchemaOpenAIChatCompletionRequest} chat Chat
         * @param {string} [xUserIP] 指定聊天中的用户 IP 地址，不指定则自动获取。此 IP 地址只会增加至 Prompt 中，如果不希望增加，请关闭系统自带 Prompt 选项
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiOpenaiCompatibleV1ChatCompletionsPost: async (chat: SchemaOpenAIChatCompletionRequest, xUserIP?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'chat' is not null or undefined
            assertParamExists('apiOpenaiCompatibleV1ChatCompletionsPost', 'chat', chat)
            const localVarPath = `/api/openai-compatible/v1/chat/completions`;
            // 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)

            if (xUserIP != null) {
                localVarHeaderParameter['X-User-IP'] = String(xUserIP);
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(chat, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 列出当前账户下的所有的对话
         * @summary 获取所有 Chat
         * @param {number} [assistantId] Assistant ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsGet: async (assistantId?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/v1/chats`;
            // 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)

            if (assistantId !== undefined) {
                localVarQueryParameter['assistant_id'] = assistantId;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 删除一个对话以及聊天记录
         * @summary Delete Chat
         * @param {number} id Chat ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsIdDelete: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1ChatsIdDelete', 'id', id)
            const localVarPath = `/api/v1/chats/{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 显示一个对话的数据
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsIdGet: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1ChatsIdGet', 'id', id)
            const localVarPath = `/api/v1/chats/{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: '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,
            };
        },
        /**
         * 可以重新设置对话的一些信息
         * @summary 更新对话
         * @param {number} id 
         * @param {SchemaChatUpdateRequest} schemaChatUpdateRequest ChatUpdateRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsIdPut: async (id: number, schemaChatUpdateRequest: SchemaChatUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1ChatsIdPut', 'id', id)
            // verify required parameter 'schemaChatUpdateRequest' is not null or undefined
            assertParamExists('apiV1ChatsIdPut', 'schemaChatUpdateRequest', schemaChatUpdateRequest)
            const localVarPath = `/api/v1/chats/{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: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication ApiKeyAuth required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(schemaChatUpdateRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 创建一个对话，如果不指定 Assistant ID，将会使用默认 Assistant。默认 Assistant 不支持上传文件以及使用外部工具。
         * @summary Create Chat
         * @param {SchemaChatCreateRequest} chat Chat
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsPost: async (chat: SchemaChatCreateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'chat' is not null or undefined
            assertParamExists('apiV1ChatsPost', 'chat', chat)
            const localVarPath = `/api/v1/chats`;
            // 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)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(chat, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * ChatApi - functional programming interface
 * @export
 */
export const ChatApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = ChatApiAxiosParamCreator(configuration)
    return {
        /**
         * 兼容 OpenAI Chat Completion 接口，认证需要使用 Assistant Share Token
         * @summary OpenAI Chat Completion
         * @param {SchemaOpenAIChatCompletionRequest} chat Chat
         * @param {string} [xUserIP] 指定聊天中的用户 IP 地址，不指定则自动获取。此 IP 地址只会增加至 Prompt 中，如果不希望增加，请关闭系统自带 Prompt 选项
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiOpenaiCompatibleV1ChatCompletionsPost(chat: SchemaOpenAIChatCompletionRequest, xUserIP?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SchemaOpenAIChatCompletionResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiOpenaiCompatibleV1ChatCompletionsPost(chat, xUserIP, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatApi.apiOpenaiCompatibleV1ChatCompletionsPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 列出当前账户下的所有的对话
         * @summary 获取所有 Chat
         * @param {number} [assistantId] Assistant ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatsGet(assistantId?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatPublicGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatsGet(assistantId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatApi.apiV1ChatsGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 删除一个对话以及聊天记录
         * @summary Delete Chat
         * @param {number} id Chat ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatsIdDelete(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SchemaResponseBody>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatsIdDelete(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatApi.apiV1ChatsIdDelete']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 将返回一个实体
         * @summary 显示一个对话的数据
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatsIdGet(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatPublicPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatsIdGet(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatApi.apiV1ChatsIdGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 可以重新设置对话的一些信息
         * @summary 更新对话
         * @param {number} id 
         * @param {SchemaChatUpdateRequest} schemaChatUpdateRequest ChatUpdateRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatsIdPut(id: number, schemaChatUpdateRequest: SchemaChatUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatPublicPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatsIdPut(id, schemaChatUpdateRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatApi.apiV1ChatsIdPut']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 创建一个对话，如果不指定 Assistant ID，将会使用默认 Assistant。默认 Assistant 不支持上传文件以及使用外部工具。
         * @summary Create Chat
         * @param {SchemaChatCreateRequest} chat Chat
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatsPost(chat: SchemaChatCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatPublicPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatsPost(chat, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatApi.apiV1ChatsPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * ChatApi - factory interface
 * @export
 */
export const ChatApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = ChatApiFp(configuration)
    return {
        /**
         * 兼容 OpenAI Chat Completion 接口，认证需要使用 Assistant Share Token
         * @summary OpenAI Chat Completion
         * @param {SchemaOpenAIChatCompletionRequest} chat Chat
         * @param {string} [xUserIP] 指定聊天中的用户 IP 地址，不指定则自动获取。此 IP 地址只会增加至 Prompt 中，如果不希望增加，请关闭系统自带 Prompt 选项
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiOpenaiCompatibleV1ChatCompletionsPost(chat: SchemaOpenAIChatCompletionRequest, xUserIP?: string, options?: RawAxiosRequestConfig): AxiosPromise<SchemaOpenAIChatCompletionResponse> {
            return localVarFp.apiOpenaiCompatibleV1ChatCompletionsPost(chat, xUserIP, options).then((request) => request(axios, basePath));
        },
        /**
         * 列出当前账户下的所有的对话
         * @summary 获取所有 Chat
         * @param {number} [assistantId] Assistant ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsGet(assistantId?: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ChatPublicGet200Response> {
            return localVarFp.apiV1ChatsGet(assistantId, options).then((request) => request(axios, basePath));
        },
        /**
         * 删除一个对话以及聊天记录
         * @summary Delete Chat
         * @param {number} id Chat ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsIdDelete(id: number, options?: RawAxiosRequestConfig): AxiosPromise<SchemaResponseBody> {
            return localVarFp.apiV1ChatsIdDelete(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 将返回一个实体
         * @summary 显示一个对话的数据
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsIdGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ChatPublicPost200Response> {
            return localVarFp.apiV1ChatsIdGet(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 可以重新设置对话的一些信息
         * @summary 更新对话
         * @param {number} id 
         * @param {SchemaChatUpdateRequest} schemaChatUpdateRequest ChatUpdateRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsIdPut(id: number, schemaChatUpdateRequest: SchemaChatUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ChatPublicPost200Response> {
            return localVarFp.apiV1ChatsIdPut(id, schemaChatUpdateRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * 创建一个对话，如果不指定 Assistant ID，将会使用默认 Assistant。默认 Assistant 不支持上传文件以及使用外部工具。
         * @summary Create Chat
         * @param {SchemaChatCreateRequest} chat Chat
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsPost(chat: SchemaChatCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ChatPublicPost200Response> {
            return localVarFp.apiV1ChatsPost(chat, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * ChatApi - object-oriented interface
 * @export
 * @class ChatApi
 * @extends {BaseAPI}
 */
export class ChatApi extends BaseAPI {
    /**
     * 兼容 OpenAI Chat Completion 接口，认证需要使用 Assistant Share Token
     * @summary OpenAI Chat Completion
     * @param {SchemaOpenAIChatCompletionRequest} chat Chat
     * @param {string} [xUserIP] 指定聊天中的用户 IP 地址，不指定则自动获取。此 IP 地址只会增加至 Prompt 中，如果不希望增加，请关闭系统自带 Prompt 选项
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatApi
     */
    public apiOpenaiCompatibleV1ChatCompletionsPost(chat: SchemaOpenAIChatCompletionRequest, xUserIP?: string, options?: RawAxiosRequestConfig) {
        return ChatApiFp(this.configuration).apiOpenaiCompatibleV1ChatCompletionsPost(chat, xUserIP, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 列出当前账户下的所有的对话
     * @summary 获取所有 Chat
     * @param {number} [assistantId] Assistant ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatApi
     */
    public apiV1ChatsGet(assistantId?: number, options?: RawAxiosRequestConfig) {
        return ChatApiFp(this.configuration).apiV1ChatsGet(assistantId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 删除一个对话以及聊天记录
     * @summary Delete Chat
     * @param {number} id Chat ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatApi
     */
    public apiV1ChatsIdDelete(id: number, options?: RawAxiosRequestConfig) {
        return ChatApiFp(this.configuration).apiV1ChatsIdDelete(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 将返回一个实体
     * @summary 显示一个对话的数据
     * @param {number} id 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatApi
     */
    public apiV1ChatsIdGet(id: number, options?: RawAxiosRequestConfig) {
        return ChatApiFp(this.configuration).apiV1ChatsIdGet(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 可以重新设置对话的一些信息
     * @summary 更新对话
     * @param {number} id 
     * @param {SchemaChatUpdateRequest} schemaChatUpdateRequest ChatUpdateRequest
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatApi
     */
    public apiV1ChatsIdPut(id: number, schemaChatUpdateRequest: SchemaChatUpdateRequest, options?: RawAxiosRequestConfig) {
        return ChatApiFp(this.configuration).apiV1ChatsIdPut(id, schemaChatUpdateRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 创建一个对话，如果不指定 Assistant ID，将会使用默认 Assistant。默认 Assistant 不支持上传文件以及使用外部工具。
     * @summary Create Chat
     * @param {SchemaChatCreateRequest} chat Chat
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatApi
     */
    public apiV1ChatsPost(chat: SchemaChatCreateRequest, options?: RawAxiosRequestConfig) {
        return ChatApiFp(this.configuration).apiV1ChatsPost(chat, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * ChatMessageApi - axios parameter creator
 * @export
 */
export const ChatMessageApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 清空当前聊天记录
         * @summary 清空聊天记录
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsIdClearPost: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1ChatsIdClearPost', 'id', id)
            const localVarPath = `/api/v1/chats/{id}/clear`
                .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 添加文件
         * @param {number} id 
         * @param {ApiV1ChatsIdFilesPostRequest} apiV1ChatsIdFilesPostRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsIdFilesPost: async (id: number, apiV1ChatsIdFilesPostRequest: ApiV1ChatsIdFilesPostRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1ChatsIdFilesPost', 'id', id)
            // verify required parameter 'apiV1ChatsIdFilesPostRequest' is not null or undefined
            assertParamExists('apiV1ChatsIdFilesPost', 'apiV1ChatsIdFilesPostRequest', apiV1ChatsIdFilesPostRequest)
            const localVarPath = `/api/v1/chats/{id}/files`
                .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)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(apiV1ChatsIdFilesPostRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 获取一个对话的所有聊天记录
         * @summary 查看聊天记录
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsIdMessagesGet: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1ChatsIdMessagesGet', 'id', id)
            const localVarPath = `/api/v1/chats/{id}/messages`
                .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,
            };
        },
        /**
         * 添加一条消息
         * @summary 添加聊天记录
         * @param {number} id 
         * @param {SchemaChatMessageAddRequest} message Message
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsIdMessagesPost: async (id: number, message: SchemaChatMessageAddRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1ChatsIdMessagesPost', 'id', id)
            // verify required parameter 'message' is not null or undefined
            assertParamExists('apiV1ChatsIdMessagesPost', 'message', message)
            const localVarPath = `/api/v1/chats/{id}/messages`
                .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)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(message, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 将会通过 SSE 的方式来流式传输内容，不建议使用本文档生成的代码来获取，第三方库有更好的解决方案。
         * @summary 流式传输文本
         * @param {string} streamId 
         * @param {string} [xUserIP] 指定聊天中的用户 IP 地址，不指定则自动获取。此 IP 地址只会增加至 Prompt 中，如果不希望增加，请关闭系统自带 Prompt 选项
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1StreamStreamIdGet: async (streamId: string, xUserIP?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'streamId' is not null or undefined
            assertParamExists('apiV1StreamStreamIdGet', 'streamId', streamId)
            const localVarPath = `/api/v1/stream/{stream_id}`
                .replace(`{${"stream_id"}}`, encodeURIComponent(String(streamId)));
            // 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;

            if (xUserIP != null) {
                localVarHeaderParameter['X-User-IP'] = String(xUserIP);
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * ChatMessageApi - functional programming interface
 * @export
 */
export const ChatMessageApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = ChatMessageApiAxiosParamCreator(configuration)
    return {
        /**
         * 清空当前聊天记录
         * @summary 清空聊天记录
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatsIdClearPost(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatsIdClearPost(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatMessageApi.apiV1ChatsIdClearPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 将一个文件添加到聊天记录中
         * @summary 添加文件
         * @param {number} id 
         * @param {ApiV1ChatsIdFilesPostRequest} apiV1ChatsIdFilesPostRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatsIdFilesPost(id: number, apiV1ChatsIdFilesPostRequest: ApiV1ChatsIdFilesPostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatPublicChatIdImagesPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatsIdFilesPost(id, apiV1ChatsIdFilesPostRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatMessageApi.apiV1ChatsIdFilesPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 获取一个对话的所有聊天记录
         * @summary 查看聊天记录
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatsIdMessagesGet(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatsIdMessagesGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatsIdMessagesGet(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatMessageApi.apiV1ChatsIdMessagesGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 添加一条消息
         * @summary 添加聊天记录
         * @param {number} id 
         * @param {SchemaChatMessageAddRequest} message Message
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatsIdMessagesPost(id: number, message: SchemaChatMessageAddRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatPublicChatIdImagesPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatsIdMessagesPost(id, message, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatMessageApi.apiV1ChatsIdMessagesPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 将会通过 SSE 的方式来流式传输内容，不建议使用本文档生成的代码来获取，第三方库有更好的解决方案。
         * @summary 流式传输文本
         * @param {string} streamId 
         * @param {string} [xUserIP] 指定聊天中的用户 IP 地址，不指定则自动获取。此 IP 地址只会增加至 Prompt 中，如果不希望增加，请关闭系统自带 Prompt 选项
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1StreamStreamIdGet(streamId: string, xUserIP?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatPublicChatIdImagesPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StreamStreamIdGet(streamId, xUserIP, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatMessageApi.apiV1StreamStreamIdGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * ChatMessageApi - factory interface
 * @export
 */
export const ChatMessageApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = ChatMessageApiFp(configuration)
    return {
        /**
         * 清空当前聊天记录
         * @summary 清空聊天记录
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsIdClearPost(id: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.apiV1ChatsIdClearPost(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 将一个文件添加到聊天记录中
         * @summary 添加文件
         * @param {number} id 
         * @param {ApiV1ChatsIdFilesPostRequest} apiV1ChatsIdFilesPostRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsIdFilesPost(id: number, apiV1ChatsIdFilesPostRequest: ApiV1ChatsIdFilesPostRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ChatPublicChatIdImagesPost200Response> {
            return localVarFp.apiV1ChatsIdFilesPost(id, apiV1ChatsIdFilesPostRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * 获取一个对话的所有聊天记录
         * @summary 查看聊天记录
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsIdMessagesGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ChatsIdMessagesGet200Response> {
            return localVarFp.apiV1ChatsIdMessagesGet(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 添加一条消息
         * @summary 添加聊天记录
         * @param {number} id 
         * @param {SchemaChatMessageAddRequest} message Message
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatsIdMessagesPost(id: number, message: SchemaChatMessageAddRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ChatPublicChatIdImagesPost200Response> {
            return localVarFp.apiV1ChatsIdMessagesPost(id, message, options).then((request) => request(axios, basePath));
        },
        /**
         * 将会通过 SSE 的方式来流式传输内容，不建议使用本文档生成的代码来获取，第三方库有更好的解决方案。
         * @summary 流式传输文本
         * @param {string} streamId 
         * @param {string} [xUserIP] 指定聊天中的用户 IP 地址，不指定则自动获取。此 IP 地址只会增加至 Prompt 中，如果不希望增加，请关闭系统自带 Prompt 选项
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1StreamStreamIdGet(streamId: string, xUserIP?: string, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ChatPublicChatIdImagesPost200Response> {
            return localVarFp.apiV1StreamStreamIdGet(streamId, xUserIP, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * ChatMessageApi - object-oriented interface
 * @export
 * @class ChatMessageApi
 * @extends {BaseAPI}
 */
export class ChatMessageApi extends BaseAPI {
    /**
     * 清空当前聊天记录
     * @summary 清空聊天记录
     * @param {number} id 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatMessageApi
     */
    public apiV1ChatsIdClearPost(id: number, options?: RawAxiosRequestConfig) {
        return ChatMessageApiFp(this.configuration).apiV1ChatsIdClearPost(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 将一个文件添加到聊天记录中
     * @summary 添加文件
     * @param {number} id 
     * @param {ApiV1ChatsIdFilesPostRequest} apiV1ChatsIdFilesPostRequest 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatMessageApi
     */
    public apiV1ChatsIdFilesPost(id: number, apiV1ChatsIdFilesPostRequest: ApiV1ChatsIdFilesPostRequest, options?: RawAxiosRequestConfig) {
        return ChatMessageApiFp(this.configuration).apiV1ChatsIdFilesPost(id, apiV1ChatsIdFilesPostRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 获取一个对话的所有聊天记录
     * @summary 查看聊天记录
     * @param {number} id 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatMessageApi
     */
    public apiV1ChatsIdMessagesGet(id: number, options?: RawAxiosRequestConfig) {
        return ChatMessageApiFp(this.configuration).apiV1ChatsIdMessagesGet(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 添加一条消息
     * @summary 添加聊天记录
     * @param {number} id 
     * @param {SchemaChatMessageAddRequest} message Message
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatMessageApi
     */
    public apiV1ChatsIdMessagesPost(id: number, message: SchemaChatMessageAddRequest, options?: RawAxiosRequestConfig) {
        return ChatMessageApiFp(this.configuration).apiV1ChatsIdMessagesPost(id, message, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 将会通过 SSE 的方式来流式传输内容，不建议使用本文档生成的代码来获取，第三方库有更好的解决方案。
     * @summary 流式传输文本
     * @param {string} streamId 
     * @param {string} [xUserIP] 指定聊天中的用户 IP 地址，不指定则自动获取。此 IP 地址只会增加至 Prompt 中，如果不希望增加，请关闭系统自带 Prompt 选项
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatMessageApi
     */
    public apiV1StreamStreamIdGet(streamId: string, xUserIP?: string, options?: RawAxiosRequestConfig) {
        return ChatMessageApiFp(this.configuration).apiV1StreamStreamIdGet(streamId, xUserIP, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * ChatPublicApi - axios parameter creator
 * @export
 */
export const ChatPublicApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary 清空公开对话的聊天记录
         * @param {number} chatId 
         * @param {SchemaGetPublicChatMessageRequest} schemaGetPublicChatMessageRequest GetPublicChatMessageRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatPublicChatIdClearPost: async (chatId: number, schemaGetPublicChatMessageRequest: SchemaGetPublicChatMessageRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'chatId' is not null or undefined
            assertParamExists('apiV1ChatPublicChatIdClearPost', 'chatId', chatId)
            // verify required parameter 'schemaGetPublicChatMessageRequest' is not null or undefined
            assertParamExists('apiV1ChatPublicChatIdClearPost', 'schemaGetPublicChatMessageRequest', schemaGetPublicChatMessageRequest)
            const localVarPath = `/api/v1/chat_public/{chat_id}/clear`
                .replace(`{${"chat_id"}}`, encodeURIComponent(String(chatId)));
            // 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;


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(schemaGetPublicChatMessageRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 将一个图片添加到聊天记录中
         * @summary 添加图片
         * @param {number} chatId 
         * @param {ApiV1ChatPublicChatIdImagesPostRequest} apiV1ChatPublicChatIdImagesPostRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatPublicChatIdImagesPost: async (chatId: number, apiV1ChatPublicChatIdImagesPostRequest: ApiV1ChatPublicChatIdImagesPostRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'chatId' is not null or undefined
            assertParamExists('apiV1ChatPublicChatIdImagesPost', 'chatId', chatId)
            // verify required parameter 'apiV1ChatPublicChatIdImagesPostRequest' is not null or undefined
            assertParamExists('apiV1ChatPublicChatIdImagesPost', 'apiV1ChatPublicChatIdImagesPostRequest', apiV1ChatPublicChatIdImagesPostRequest)
            const localVarPath = `/api/v1/chat_public/{chat_id}/images`
                .replace(`{${"chat_id"}}`, encodeURIComponent(String(chatId)));
            // 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;


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(apiV1ChatPublicChatIdImagesPostRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary 获取公开对话的聊天记录
         * @param {number} chatId 
         * @param {string} assistantKey 
         * @param {string} guestId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatPublicChatIdMessagesGet: async (chatId: number, assistantKey: string, guestId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'chatId' is not null or undefined
            assertParamExists('apiV1ChatPublicChatIdMessagesGet', 'chatId', chatId)
            // 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`
                .replace(`{${"chat_id"}}`, encodeURIComponent(String(chatId)));
            // 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;

            if (assistantKey !== undefined) {
                localVarQueryParameter['assistant_key'] = assistantKey;
            }

            if (guestId !== undefined) {
                localVarQueryParameter['guest_id'] = guestId;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary 增加公开对话的聊天记录
         * @param {number} chatId 
         * @param {SchemaAddPublicChatMessageRequest} schemaAddPublicChatMessageRequest AddPublicChatMessageRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatPublicChatIdMessagesPost: async (chatId: number, schemaAddPublicChatMessageRequest: SchemaAddPublicChatMessageRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'chatId' is not null or undefined
            assertParamExists('apiV1ChatPublicChatIdMessagesPost', 'chatId', chatId)
            // verify required parameter 'schemaAddPublicChatMessageRequest' is not null or undefined
            assertParamExists('apiV1ChatPublicChatIdMessagesPost', 'schemaAddPublicChatMessageRequest', schemaAddPublicChatMessageRequest)
            const localVarPath = `/api/v1/chat_public/{chat_id}/messages`
                .replace(`{${"chat_id"}}`, encodeURIComponent(String(chatId)));
            // 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;


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(schemaAddPublicChatMessageRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary 获取公开对话
         * @param {SchemaChatPublicListRequest} schemaChatPublicListRequest ChatPublicListRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatPublicGet: async (schemaChatPublicListRequest: SchemaChatPublicListRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'schemaChatPublicListRequest' is not null or undefined
            assertParamExists('apiV1ChatPublicGet', 'schemaChatPublicListRequest', schemaChatPublicListRequest)
            const localVarPath = `/api/v1/chat_public`;
            // 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;


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(schemaChatPublicListRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary 通过 API 创建一个公开的对话记录
         * @param {SchemaChatPublicRequest} schemaChatPublicRequest ChatPublicRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatPublicPost: async (schemaChatPublicRequest: SchemaChatPublicRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'schemaChatPublicRequest' is not null or undefined
            assertParamExists('apiV1ChatPublicPost', 'schemaChatPublicRequest', schemaChatPublicRequest)
            const localVarPath = `/api/v1/chat_public`;
            // 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;


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(schemaChatPublicRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * ChatPublicApi - functional programming interface
 * @export
 */
export const ChatPublicApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = ChatPublicApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary 清空公开对话的聊天记录
         * @param {number} chatId 
         * @param {SchemaGetPublicChatMessageRequest} schemaGetPublicChatMessageRequest GetPublicChatMessageRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatPublicChatIdClearPost(chatId: number, schemaGetPublicChatMessageRequest: SchemaGetPublicChatMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatPublicChatIdClearPost(chatId, schemaGetPublicChatMessageRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatPublicApi.apiV1ChatPublicChatIdClearPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 将一个图片添加到聊天记录中
         * @summary 添加图片
         * @param {number} chatId 
         * @param {ApiV1ChatPublicChatIdImagesPostRequest} apiV1ChatPublicChatIdImagesPostRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatPublicChatIdImagesPost(chatId: number, apiV1ChatPublicChatIdImagesPostRequest: ApiV1ChatPublicChatIdImagesPostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatPublicChatIdImagesPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatPublicChatIdImagesPost(chatId, apiV1ChatPublicChatIdImagesPostRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatPublicApi.apiV1ChatPublicChatIdImagesPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 获取公开对话的聊天记录
         * @param {number} chatId 
         * @param {string} assistantKey 
         * @param {string} guestId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatPublicChatIdMessagesGet(chatId: number, assistantKey: string, guestId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatPublicChatIdMessagesGet200Response>> {
            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);
        },
        /**
         * 
         * @summary 增加公开对话的聊天记录
         * @param {number} chatId 
         * @param {SchemaAddPublicChatMessageRequest} schemaAddPublicChatMessageRequest AddPublicChatMessageRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatPublicChatIdMessagesPost(chatId: number, schemaAddPublicChatMessageRequest: SchemaAddPublicChatMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatPublicChatIdImagesPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatPublicChatIdMessagesPost(chatId, schemaAddPublicChatMessageRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatPublicApi.apiV1ChatPublicChatIdMessagesPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 获取公开对话
         * @param {SchemaChatPublicListRequest} schemaChatPublicListRequest ChatPublicListRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatPublicGet(schemaChatPublicListRequest: SchemaChatPublicListRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatPublicGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatPublicGet(schemaChatPublicListRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatPublicApi.apiV1ChatPublicGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 通过 API 创建一个公开的对话记录
         * @param {SchemaChatPublicRequest} schemaChatPublicRequest ChatPublicRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ChatPublicPost(schemaChatPublicRequest: SchemaChatPublicRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ChatPublicPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatPublicPost(schemaChatPublicRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ChatPublicApi.apiV1ChatPublicPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * ChatPublicApi - factory interface
 * @export
 */
export const ChatPublicApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = ChatPublicApiFp(configuration)
    return {
        /**
         * 
         * @summary 清空公开对话的聊天记录
         * @param {number} chatId 
         * @param {SchemaGetPublicChatMessageRequest} schemaGetPublicChatMessageRequest GetPublicChatMessageRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatPublicChatIdClearPost(chatId: number, schemaGetPublicChatMessageRequest: SchemaGetPublicChatMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.apiV1ChatPublicChatIdClearPost(chatId, schemaGetPublicChatMessageRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * 将一个图片添加到聊天记录中
         * @summary 添加图片
         * @param {number} chatId 
         * @param {ApiV1ChatPublicChatIdImagesPostRequest} apiV1ChatPublicChatIdImagesPostRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatPublicChatIdImagesPost(chatId: number, apiV1ChatPublicChatIdImagesPostRequest: ApiV1ChatPublicChatIdImagesPostRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ChatPublicChatIdImagesPost200Response> {
            return localVarFp.apiV1ChatPublicChatIdImagesPost(chatId, apiV1ChatPublicChatIdImagesPostRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 获取公开对话的聊天记录
         * @param {number} chatId 
         * @param {string} assistantKey 
         * @param {string} guestId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatPublicChatIdMessagesGet(chatId: number, assistantKey: string, guestId: string, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ChatPublicChatIdMessagesGet200Response> {
            return localVarFp.apiV1ChatPublicChatIdMessagesGet(chatId, assistantKey, guestId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 增加公开对话的聊天记录
         * @param {number} chatId 
         * @param {SchemaAddPublicChatMessageRequest} schemaAddPublicChatMessageRequest AddPublicChatMessageRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatPublicChatIdMessagesPost(chatId: number, schemaAddPublicChatMessageRequest: SchemaAddPublicChatMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ChatPublicChatIdImagesPost200Response> {
            return localVarFp.apiV1ChatPublicChatIdMessagesPost(chatId, schemaAddPublicChatMessageRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 获取公开对话
         * @param {SchemaChatPublicListRequest} schemaChatPublicListRequest ChatPublicListRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatPublicGet(schemaChatPublicListRequest: SchemaChatPublicListRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ChatPublicGet200Response> {
            return localVarFp.apiV1ChatPublicGet(schemaChatPublicListRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 通过 API 创建一个公开的对话记录
         * @param {SchemaChatPublicRequest} schemaChatPublicRequest ChatPublicRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ChatPublicPost(schemaChatPublicRequest: SchemaChatPublicRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ChatPublicPost200Response> {
            return localVarFp.apiV1ChatPublicPost(schemaChatPublicRequest, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * ChatPublicApi - object-oriented interface
 * @export
 * @class ChatPublicApi
 * @extends {BaseAPI}
 */
export class ChatPublicApi extends BaseAPI {
    /**
     * 
     * @summary 清空公开对话的聊天记录
     * @param {number} chatId 
     * @param {SchemaGetPublicChatMessageRequest} schemaGetPublicChatMessageRequest GetPublicChatMessageRequest
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatPublicApi
     */
    public apiV1ChatPublicChatIdClearPost(chatId: number, schemaGetPublicChatMessageRequest: SchemaGetPublicChatMessageRequest, options?: RawAxiosRequestConfig) {
        return ChatPublicApiFp(this.configuration).apiV1ChatPublicChatIdClearPost(chatId, schemaGetPublicChatMessageRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 将一个图片添加到聊天记录中
     * @summary 添加图片
     * @param {number} chatId 
     * @param {ApiV1ChatPublicChatIdImagesPostRequest} apiV1ChatPublicChatIdImagesPostRequest 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatPublicApi
     */
    public apiV1ChatPublicChatIdImagesPost(chatId: number, apiV1ChatPublicChatIdImagesPostRequest: ApiV1ChatPublicChatIdImagesPostRequest, options?: RawAxiosRequestConfig) {
        return ChatPublicApiFp(this.configuration).apiV1ChatPublicChatIdImagesPost(chatId, apiV1ChatPublicChatIdImagesPostRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 获取公开对话的聊天记录
     * @param {number} chatId 
     * @param {string} assistantKey 
     * @param {string} guestId 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatPublicApi
     */
    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));
    }

    /**
     * 
     * @summary 增加公开对话的聊天记录
     * @param {number} chatId 
     * @param {SchemaAddPublicChatMessageRequest} schemaAddPublicChatMessageRequest AddPublicChatMessageRequest
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatPublicApi
     */
    public apiV1ChatPublicChatIdMessagesPost(chatId: number, schemaAddPublicChatMessageRequest: SchemaAddPublicChatMessageRequest, options?: RawAxiosRequestConfig) {
        return ChatPublicApiFp(this.configuration).apiV1ChatPublicChatIdMessagesPost(chatId, schemaAddPublicChatMessageRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 获取公开对话
     * @param {SchemaChatPublicListRequest} schemaChatPublicListRequest ChatPublicListRequest
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatPublicApi
     */
    public apiV1ChatPublicGet(schemaChatPublicListRequest: SchemaChatPublicListRequest, options?: RawAxiosRequestConfig) {
        return ChatPublicApiFp(this.configuration).apiV1ChatPublicGet(schemaChatPublicListRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 通过 API 创建一个公开的对话记录
     * @param {SchemaChatPublicRequest} schemaChatPublicRequest ChatPublicRequest
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ChatPublicApi
     */
    public apiV1ChatPublicPost(schemaChatPublicRequest: SchemaChatPublicRequest, options?: RawAxiosRequestConfig) {
        return ChatPublicApiFp(this.configuration).apiV1ChatPublicPost(schemaChatPublicRequest, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * FileApi - axios parameter creator
 * @export
 */
export const FileApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 根据文件 Hash 下载文件。仅支持图片下载，且图片具有有效期
         * @summary 下载图片
         * @param {string} hash FileId uint64 &#x60;uri:\&quot;id\&quot; binding:\&quot;required\&quot;&#x60;
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1FilesDownloadHashGet: async (hash: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'hash' is not null or undefined
            assertParamExists('apiV1FilesDownloadHashGet', 'hash', hash)
            const localVarPath = `/api/v1/files/download/{hash}`
                .replace(`{${"hash"}}`, encodeURIComponent(String(hash)));
            // 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;


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * FileApi - functional programming interface
 * @export
 */
export const FileApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = FileApiAxiosParamCreator(configuration)
    return {
        /**
         * 根据文件 Hash 下载文件。仅支持图片下载，且图片具有有效期
         * @summary 下载图片
         * @param {string} hash FileId uint64 &#x60;uri:\&quot;id\&quot; binding:\&quot;required\&quot;&#x60;
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1FilesDownloadHashGet(hash: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1FilesDownloadHashGet(hash, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FileApi.apiV1FilesDownloadHashGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * FileApi - factory interface
 * @export
 */
export const FileApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = FileApiFp(configuration)
    return {
        /**
         * 根据文件 Hash 下载文件。仅支持图片下载，且图片具有有效期
         * @summary 下载图片
         * @param {string} hash FileId uint64 &#x60;uri:\&quot;id\&quot; binding:\&quot;required\&quot;&#x60;
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1FilesDownloadHashGet(hash: string, options?: RawAxiosRequestConfig): AxiosPromise<File> {
            return localVarFp.apiV1FilesDownloadHashGet(hash, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * FileApi - object-oriented interface
 * @export
 * @class FileApi
 * @extends {BaseAPI}
 */
export class FileApi extends BaseAPI {
    /**
     * 根据文件 Hash 下载文件。仅支持图片下载，且图片具有有效期
     * @summary 下载图片
     * @param {string} hash FileId uint64 &#x60;uri:\&quot;id\&quot; binding:\&quot;required\&quot;&#x60;
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof FileApi
     */
    public apiV1FilesDownloadHashGet(hash: string, options?: RawAxiosRequestConfig) {
        return FileApiFp(this.configuration).apiV1FilesDownloadHashGet(hash, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * 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,
            };
        },
        /**
         * 
         * @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 删除指定的文档
         * @param {number} documentId 
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1LibrariesIdDocumentsDocumentIdDelete: async (documentId: number, id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'documentId' is not null or undefined
            assertParamExists('apiV1LibrariesIdDocumentsDocumentIdDelete', 'documentId', documentId)
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1LibrariesIdDocumentsDocumentIdDelete', 'id', id)
            const localVarPath = `/api/v1/libraries/{id}/documents/{document_id}`
                .replace(`{${"document_id"}}`, encodeURIComponent(String(documentId)))
                .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 列出资料库以及资料库下的文档
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1LibrariesIdDocumentsGet: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1LibrariesIdDocumentsGet', 'id', id)
            const localVarPath = `/api/v1/libraries/{id}/documents`
                .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,
            };
        },
        /**
         * 
         * @summary 创建文档
         * @param {number} id 
         * @param {SchemaDocumentCreateRequest} schemaDocumentCreateRequest schema.DocumentCreateRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1LibrariesIdDocumentsPost: async (id: number, schemaDocumentCreateRequest: SchemaDocumentCreateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1LibrariesIdDocumentsPost', 'id', id)
            // verify required parameter 'schemaDocumentCreateRequest' is not null or undefined
            assertParamExists('apiV1LibrariesIdDocumentsPost', 'schemaDocumentCreateRequest', schemaDocumentCreateRequest)
            const localVarPath = `/api/v1/libraries/{id}/documents`
                .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)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(schemaDocumentCreateRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary 获取一个资料库
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1LibrariesIdGet: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1LibrariesIdGet', '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: '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,
            };
        },
        /**
         * 
         * @summary 更新资料库
         * @param {number} id 
         * @param {SchemaLibraryUpdateRequest} schemaLibraryUpdateRequest schema.LibraryUpdateRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1LibrariesIdPut: async (id: number, schemaLibraryUpdateRequest: SchemaLibraryUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1LibrariesIdPut', 'id', id)
            // verify required parameter 'schemaLibraryUpdateRequest' is not null or undefined
            assertParamExists('apiV1LibrariesIdPut', 'schemaLibraryUpdateRequest', schemaLibraryUpdateRequest)
            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: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication ApiKeyAuth required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(schemaLibraryUpdateRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary 创建一个资料库
         * @param {SchemaLibraryCreateRequest} schemaLibraryCreateRequest schema.LibraryCreateRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1LibrariesPost: async (schemaLibraryCreateRequest: SchemaLibraryCreateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'schemaLibraryCreateRequest' is not null or undefined
            assertParamExists('apiV1LibrariesPost', 'schemaLibraryCreateRequest', schemaLibraryCreateRequest)
            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: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication ApiKeyAuth required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(schemaLibraryCreateRequest, localVarRequestOptions, configuration)

            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);
        },
        /**
         * 
         * @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['LibrariesApi.apiV1LibrariesIdDelete']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 删除指定的文档
         * @param {number} documentId 
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1LibrariesIdDocumentsDocumentIdDelete(documentId: number, id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1LibrariesIdDocumentsDocumentIdDelete(documentId, id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['LibrariesApi.apiV1LibrariesIdDocumentsDocumentIdDelete']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 列出资料库以及资料库下的文档
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1LibrariesIdDocumentsGet(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1LibrariesIdDocumentsGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1LibrariesIdDocumentsGet(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['LibrariesApi.apiV1LibrariesIdDocumentsGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 创建文档
         * @param {number} id 
         * @param {SchemaDocumentCreateRequest} schemaDocumentCreateRequest schema.DocumentCreateRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1LibrariesIdDocumentsPost(id: number, schemaDocumentCreateRequest: SchemaDocumentCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1LibrariesIdDocumentsPost(id, schemaDocumentCreateRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['LibrariesApi.apiV1LibrariesIdDocumentsPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 获取一个资料库
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1LibrariesIdGet(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1LibrariesGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1LibrariesIdGet(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['LibrariesApi.apiV1LibrariesIdGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 更新资料库
         * @param {number} id 
         * @param {SchemaLibraryUpdateRequest} schemaLibraryUpdateRequest schema.LibraryUpdateRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1LibrariesIdPut(id: number, schemaLibraryUpdateRequest: SchemaLibraryUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1LibrariesIdPut(id, schemaLibraryUpdateRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['LibrariesApi.apiV1LibrariesIdPut']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 创建一个资料库
         * @param {SchemaLibraryCreateRequest} schemaLibraryCreateRequest schema.LibraryCreateRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1LibrariesPost(schemaLibraryCreateRequest: SchemaLibraryCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1LibrariesPost201Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1LibrariesPost(schemaLibraryCreateRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['LibrariesApi.apiV1LibrariesPost']?.[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?: RawAxiosRequestConfig): AxiosPromise<ApiV1LibrariesGet200Response> {
            return localVarFp.apiV1LibrariesGet(options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 删除资料库
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1LibrariesIdDelete(id: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.apiV1LibrariesIdDelete(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 删除指定的文档
         * @param {number} documentId 
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1LibrariesIdDocumentsDocumentIdDelete(documentId: number, id: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.apiV1LibrariesIdDocumentsDocumentIdDelete(documentId, id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 列出资料库以及资料库下的文档
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1LibrariesIdDocumentsGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1LibrariesIdDocumentsGet200Response> {
            return localVarFp.apiV1LibrariesIdDocumentsGet(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 创建文档
         * @param {number} id 
         * @param {SchemaDocumentCreateRequest} schemaDocumentCreateRequest schema.DocumentCreateRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1LibrariesIdDocumentsPost(id: number, schemaDocumentCreateRequest: SchemaDocumentCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.apiV1LibrariesIdDocumentsPost(id, schemaDocumentCreateRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 获取一个资料库
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1LibrariesIdGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1LibrariesGet200Response> {
            return localVarFp.apiV1LibrariesIdGet(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 更新资料库
         * @param {number} id 
         * @param {SchemaLibraryUpdateRequest} schemaLibraryUpdateRequest schema.LibraryUpdateRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1LibrariesIdPut(id: number, schemaLibraryUpdateRequest: SchemaLibraryUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.apiV1LibrariesIdPut(id, schemaLibraryUpdateRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 创建一个资料库
         * @param {SchemaLibraryCreateRequest} schemaLibraryCreateRequest schema.LibraryCreateRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1LibrariesPost(schemaLibraryCreateRequest: SchemaLibraryCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1LibrariesPost201Response> {
            return localVarFp.apiV1LibrariesPost(schemaLibraryCreateRequest, 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));
    }

    /**
     * 
     * @summary 删除资料库
     * @param {number} id 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LibrariesApi
     */
    public apiV1LibrariesIdDelete(id: number, options?: RawAxiosRequestConfig) {
        return LibrariesApiFp(this.configuration).apiV1LibrariesIdDelete(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 删除指定的文档
     * @param {number} documentId 
     * @param {number} id 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LibrariesApi
     */
    public apiV1LibrariesIdDocumentsDocumentIdDelete(documentId: number, id: number, options?: RawAxiosRequestConfig) {
        return LibrariesApiFp(this.configuration).apiV1LibrariesIdDocumentsDocumentIdDelete(documentId, id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 列出资料库以及资料库下的文档
     * @param {number} id 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LibrariesApi
     */
    public apiV1LibrariesIdDocumentsGet(id: number, options?: RawAxiosRequestConfig) {
        return LibrariesApiFp(this.configuration).apiV1LibrariesIdDocumentsGet(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 创建文档
     * @param {number} id 
     * @param {SchemaDocumentCreateRequest} schemaDocumentCreateRequest schema.DocumentCreateRequest
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LibrariesApi
     */
    public apiV1LibrariesIdDocumentsPost(id: number, schemaDocumentCreateRequest: SchemaDocumentCreateRequest, options?: RawAxiosRequestConfig) {
        return LibrariesApiFp(this.configuration).apiV1LibrariesIdDocumentsPost(id, schemaDocumentCreateRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 获取一个资料库
     * @param {number} id 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LibrariesApi
     */
    public apiV1LibrariesIdGet(id: number, options?: RawAxiosRequestConfig) {
        return LibrariesApiFp(this.configuration).apiV1LibrariesIdGet(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 更新资料库
     * @param {number} id 
     * @param {SchemaLibraryUpdateRequest} schemaLibraryUpdateRequest schema.LibraryUpdateRequest
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LibrariesApi
     */
    public apiV1LibrariesIdPut(id: number, schemaLibraryUpdateRequest: SchemaLibraryUpdateRequest, options?: RawAxiosRequestConfig) {
        return LibrariesApiFp(this.configuration).apiV1LibrariesIdPut(id, schemaLibraryUpdateRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 创建一个资料库
     * @param {SchemaLibraryCreateRequest} schemaLibraryCreateRequest schema.LibraryCreateRequest
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LibrariesApi
     */
    public apiV1LibrariesPost(schemaLibraryCreateRequest: SchemaLibraryCreateRequest, options?: RawAxiosRequestConfig) {
        return LibrariesApiFp(this.configuration).apiV1LibrariesPost(schemaLibraryCreateRequest, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * MemoiresApi - axios parameter creator
 * @export
 */
export const MemoiresApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary 获取所有的记忆
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1MemoriesGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/v1/memories`;
            // 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,
            };
        },
        /**
         * 
         * @summary 删除指定的记忆
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1MemoriesIdDelete: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1MemoriesIdDelete', 'id', id)
            const localVarPath = `/api/v1/memories/{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 删除全部记忆
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1MemoriesPurgePost: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/v1/memories/purge`;
            // 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,
            };
        },
    }
};

/**
 * MemoiresApi - functional programming interface
 * @export
 */
export const MemoiresApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = MemoiresApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary 获取所有的记忆
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1MemoriesGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1MemoriesGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1MemoriesGet(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['MemoiresApi.apiV1MemoriesGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 删除指定的记忆
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1MemoriesIdDelete(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1MemoriesIdDelete(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['MemoiresApi.apiV1MemoriesIdDelete']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary 删除全部记忆
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1MemoriesPurgePost(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1MemoriesPurgePost(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['MemoiresApi.apiV1MemoriesPurgePost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * MemoiresApi - factory interface
 * @export
 */
export const MemoiresApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = MemoiresApiFp(configuration)
    return {
        /**
         * 
         * @summary 获取所有的记忆
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1MemoriesGet(options?: RawAxiosRequestConfig): AxiosPromise<ApiV1MemoriesGet200Response> {
            return localVarFp.apiV1MemoriesGet(options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 删除指定的记忆
         * @param {number} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1MemoriesIdDelete(id: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.apiV1MemoriesIdDelete(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary 删除全部记忆
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1MemoriesPurgePost(options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.apiV1MemoriesPurgePost(options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * MemoiresApi - object-oriented interface
 * @export
 * @class MemoiresApi
 * @extends {BaseAPI}
 */
export class MemoiresApi extends BaseAPI {
    /**
     * 
     * @summary 获取所有的记忆
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof MemoiresApi
     */
    public apiV1MemoriesGet(options?: RawAxiosRequestConfig) {
        return MemoiresApiFp(this.configuration).apiV1MemoriesGet(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 删除指定的记忆
     * @param {number} id 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof MemoiresApi
     */
    public apiV1MemoriesIdDelete(id: number, options?: RawAxiosRequestConfig) {
        return MemoiresApiFp(this.configuration).apiV1MemoriesIdDelete(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 删除全部记忆
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof MemoiresApi
     */
    public apiV1MemoriesPurgePost(options?: RawAxiosRequestConfig) {
        return MemoiresApiFp(this.configuration).apiV1MemoriesPurgePost(options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * PingApi - axios parameter creator
 * @export
 */
export const PingApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 测试接口，将会返回当前用户的信息
         * @summary Greet
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        apiV1PingGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/v1/ping`;
            // 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,
            };
        },
    }
};

/**
 * PingApi - functional programming interface
 * @export
 */
export const PingApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = PingApiAxiosParamCreator(configuration)
    return {
        /**
         * 测试接口，将会返回当前用户的信息
         * @summary Greet
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async apiV1PingGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1PingGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1PingGet(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['PingApi.apiV1PingGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * PingApi - factory interface
 * @export
 */
export const PingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = PingApiFp(configuration)
    return {
        /**
         * 测试接口，将会返回当前用户的信息
         * @summary Greet
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        apiV1PingGet(options?: RawAxiosRequestConfig): AxiosPromise<ApiV1PingGet200Response> {
            return localVarFp.apiV1PingGet(options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * PingApi - object-oriented interface
 * @export
 * @class PingApi
 * @extends {BaseAPI}
 */
export class PingApi extends BaseAPI {
    /**
     * 测试接口，将会返回当前用户的信息
     * @summary Greet
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     * @memberof PingApi
     */
    public apiV1PingGet(options?: RawAxiosRequestConfig) {
        return PingApiFp(this.configuration).apiV1PingGet(options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * ToolApi - axios parameter creator
 * @export
 */
export const ToolApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * List tools
         * @summary List Tool
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ToolsGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/v1/tools`;
            // 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,
            };
        },
        /**
         * DeleteTool
         * @summary DeleteTool
         * @param {number} id Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ToolsIdDelete: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1ToolsIdDelete', 'id', id)
            const localVarPath = `/api/v1/tools/{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,
            };
        },
        /**
         * Get tool
         * @summary Get Tool
         * @param {number} id Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ToolsIdGet: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1ToolsIdGet', 'id', id)
            const localVarPath = `/api/v1/tools/{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: '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,
            };
        },
        /**
         * 如果你的 Tool Discovery 内容改变了，你需要调用此接口更新数据
         * @summary 更新 Tool 的数据
         * @param {number} id Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ToolsIdUpdatePost: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('apiV1ToolsIdUpdatePost', 'id', id)
            const localVarPath = `/api/v1/tools/{id}/update`
                .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,
            };
        },
        /**
         * Create tool
         * @summary Create Tool
         * @param {SchemaToolCreateRequest} tool Tool
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ToolsPost: async (tool: SchemaToolCreateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'tool' is not null or undefined
            assertParamExists('apiV1ToolsPost', 'tool', tool)
            const localVarPath = `/api/v1/tools`;
            // 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)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(tool, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 如果你的 Tool Discovery 内容改变了，你需要调用此接口更新数据
         * @summary 校验 Discovery 语法
         * @param {SchemaToolDiscoveryInput} toolDiscoveryInput ToolDiscoveryInput
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ToolsSyntaxPost: async (toolDiscoveryInput: SchemaToolDiscoveryInput, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'toolDiscoveryInput' is not null or undefined
            assertParamExists('apiV1ToolsSyntaxPost', 'toolDiscoveryInput', toolDiscoveryInput)
            const localVarPath = `/api/v1/tools/syntax`;
            // 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)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(toolDiscoveryInput, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * ToolApi - functional programming interface
 * @export
 */
export const ToolApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = ToolApiAxiosParamCreator(configuration)
    return {
        /**
         * List tools
         * @summary List Tool
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ToolsGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ToolsGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ToolsGet(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ToolApi.apiV1ToolsGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * DeleteTool
         * @summary DeleteTool
         * @param {number} id Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ToolsIdDelete(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ToolsIdDelete(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ToolApi.apiV1ToolsIdDelete']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get tool
         * @summary Get Tool
         * @param {number} id Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ToolsIdGet(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ToolsPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ToolsIdGet(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ToolApi.apiV1ToolsIdGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 如果你的 Tool Discovery 内容改变了，你需要调用此接口更新数据
         * @summary 更新 Tool 的数据
         * @param {number} id Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ToolsIdUpdatePost(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ToolsPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ToolsIdUpdatePost(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ToolApi.apiV1ToolsIdUpdatePost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Create tool
         * @summary Create Tool
         * @param {SchemaToolCreateRequest} tool Tool
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ToolsPost(tool: SchemaToolCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1ToolsPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ToolsPost(tool, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ToolApi.apiV1ToolsPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 如果你的 Tool Discovery 内容改变了，你需要调用此接口更新数据
         * @summary 校验 Discovery 语法
         * @param {SchemaToolDiscoveryInput} toolDiscoveryInput ToolDiscoveryInput
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1ToolsSyntaxPost(toolDiscoveryInput: SchemaToolDiscoveryInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SchemaResponseBody>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ToolsSyntaxPost(toolDiscoveryInput, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ToolApi.apiV1ToolsSyntaxPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * ToolApi - factory interface
 * @export
 */
export const ToolApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = ToolApiFp(configuration)
    return {
        /**
         * List tools
         * @summary List Tool
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ToolsGet(options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ToolsGet200Response> {
            return localVarFp.apiV1ToolsGet(options).then((request) => request(axios, basePath));
        },
        /**
         * DeleteTool
         * @summary DeleteTool
         * @param {number} id Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ToolsIdDelete(id: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.apiV1ToolsIdDelete(id, options).then((request) => request(axios, basePath));
        },
        /**
         * Get tool
         * @summary Get Tool
         * @param {number} id Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ToolsIdGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ToolsPost200Response> {
            return localVarFp.apiV1ToolsIdGet(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 如果你的 Tool Discovery 内容改变了，你需要调用此接口更新数据
         * @summary 更新 Tool 的数据
         * @param {number} id Tool ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ToolsIdUpdatePost(id: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ToolsPost200Response> {
            return localVarFp.apiV1ToolsIdUpdatePost(id, options).then((request) => request(axios, basePath));
        },
        /**
         * Create tool
         * @summary Create Tool
         * @param {SchemaToolCreateRequest} tool Tool
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ToolsPost(tool: SchemaToolCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1ToolsPost200Response> {
            return localVarFp.apiV1ToolsPost(tool, options).then((request) => request(axios, basePath));
        },
        /**
         * 如果你的 Tool Discovery 内容改变了，你需要调用此接口更新数据
         * @summary 校验 Discovery 语法
         * @param {SchemaToolDiscoveryInput} toolDiscoveryInput ToolDiscoveryInput
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1ToolsSyntaxPost(toolDiscoveryInput: SchemaToolDiscoveryInput, options?: RawAxiosRequestConfig): AxiosPromise<SchemaResponseBody> {
            return localVarFp.apiV1ToolsSyntaxPost(toolDiscoveryInput, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * ToolApi - object-oriented interface
 * @export
 * @class ToolApi
 * @extends {BaseAPI}
 */
export class ToolApi extends BaseAPI {
    /**
     * List tools
     * @summary List Tool
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ToolApi
     */
    public apiV1ToolsGet(options?: RawAxiosRequestConfig) {
        return ToolApiFp(this.configuration).apiV1ToolsGet(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * DeleteTool
     * @summary DeleteTool
     * @param {number} id Tool ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ToolApi
     */
    public apiV1ToolsIdDelete(id: number, options?: RawAxiosRequestConfig) {
        return ToolApiFp(this.configuration).apiV1ToolsIdDelete(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get tool
     * @summary Get Tool
     * @param {number} id Tool ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ToolApi
     */
    public apiV1ToolsIdGet(id: number, options?: RawAxiosRequestConfig) {
        return ToolApiFp(this.configuration).apiV1ToolsIdGet(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 如果你的 Tool Discovery 内容改变了，你需要调用此接口更新数据
     * @summary 更新 Tool 的数据
     * @param {number} id Tool ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ToolApi
     */
    public apiV1ToolsIdUpdatePost(id: number, options?: RawAxiosRequestConfig) {
        return ToolApiFp(this.configuration).apiV1ToolsIdUpdatePost(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Create tool
     * @summary Create Tool
     * @param {SchemaToolCreateRequest} tool Tool
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ToolApi
     */
    public apiV1ToolsPost(tool: SchemaToolCreateRequest, options?: RawAxiosRequestConfig) {
        return ToolApiFp(this.configuration).apiV1ToolsPost(tool, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 如果你的 Tool Discovery 内容改变了，你需要调用此接口更新数据
     * @summary 校验 Discovery 语法
     * @param {SchemaToolDiscoveryInput} toolDiscoveryInput ToolDiscoveryInput
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ToolApi
     */
    public apiV1ToolsSyntaxPost(toolDiscoveryInput: SchemaToolDiscoveryInput, options?: RawAxiosRequestConfig) {
        return ToolApiFp(this.configuration).apiV1ToolsSyntaxPost(toolDiscoveryInput, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * UsageApi - axios parameter creator
 * @export
 */
export const UsageApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary 获取站点 Usage
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1UsageGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/v1/usage`;
            // 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;


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * UsageApi - functional programming interface
 * @export
 */
export const UsageApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = UsageApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary 获取站点 Usage
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async apiV1UsageGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1UsageGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1UsageGet(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['UsageApi.apiV1UsageGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * UsageApi - factory interface
 * @export
 */
export const UsageApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = UsageApiFp(configuration)
    return {
        /**
         * 
         * @summary 获取站点 Usage
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        apiV1UsageGet(options?: RawAxiosRequestConfig): AxiosPromise<ApiV1UsageGet200Response> {
            return localVarFp.apiV1UsageGet(options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * UsageApi - object-oriented interface
 * @export
 * @class UsageApi
 * @extends {BaseAPI}
 */
export class UsageApi extends BaseAPI {
    /**
     * 
     * @summary 获取站点 Usage
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UsageApi
     */
    public apiV1UsageGet(options?: RawAxiosRequestConfig) {
        return UsageApiFp(this.configuration).apiV1UsageGet(options).then((request) => request(this.axios, this.basePath));
    }
}



