diff --git a/api/swagger.yaml b/api/swagger.yaml index f2bc2ef..4584cd7 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -265,6 +265,35 @@ paths: summary: 创建 Assistant tags: - assistant + /api/v1/assistants/{id}: + delete: + consumes: + - application/json + description: get string by ID + parameters: + - description: Assistant ID + in: path + name: id + required: true + type: integer + produces: + - application/json + responses: + "204": + description: No Content + "404": + description: Not Found + schema: + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 删除 Assistant + tags: + - assistant /api/v1/assistants/{id}/tools: get: consumes: diff --git a/src/api/api.ts b/src/api/api.ts index ddec4e1..d15f579 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -896,6 +896,43 @@ export const AssistantApiAxiosParamCreator = function (configuration?: Configura + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * get string by ID + * @summary 删除 Assistant + * @param {number} id Assistant ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1AssistantsIdDelete: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { + // 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}; @@ -1085,6 +1122,19 @@ export const AssistantApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsGet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * get string by ID + * @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> { + 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); + }, /** * get string by ID * @summary 获取 Assistant 所绑定的 Tool @@ -1158,6 +1208,16 @@ export const AssistantApiFactory = function (configuration?: Configuration, base apiV1AssistantsGet(options?: any): AxiosPromise { return localVarFp.apiV1AssistantsGet(options).then((request) => request(axios, basePath)); }, + /** + * get string by ID + * @summary 删除 Assistant + * @param {number} id Assistant ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1AssistantsIdDelete(id: number, options?: any): AxiosPromise { + return localVarFp.apiV1AssistantsIdDelete(id, options).then((request) => request(axios, basePath)); + }, /** * get string by ID * @summary 获取 Assistant 所绑定的 Tool @@ -1221,6 +1281,18 @@ export class AssistantApi extends BaseAPI { return AssistantApiFp(this.configuration).apiV1AssistantsGet(options).then((request) => request(this.axios, this.basePath)); } + /** + * get string by ID + * @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)); + } + /** * get string by ID * @summary 获取 Assistant 所绑定的 Tool diff --git a/src/pages/assistants/create.vue b/src/pages/assistants/create.vue new file mode 100644 index 0000000..7ec28b7 --- /dev/null +++ b/src/pages/assistants/create.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/src/pages/assistants/index.vue b/src/pages/assistants/index.vue index be39314..4e10e81 100644 --- a/src/pages/assistants/index.vue +++ b/src/pages/assistants/index.vue @@ -1,6 +1,8 @@ diff --git a/src/typed-router.d.ts b/src/typed-router.d.ts index 65da6dc..49e708d 100644 --- a/src/typed-router.d.ts +++ b/src/typed-router.d.ts @@ -20,6 +20,7 @@ declare module 'vue-router/auto-routes' { export interface RouteNamedMap { '/': RouteRecordInfo<'/', '/', Record, Record>, '/assistants/': RouteRecordInfo<'/assistants/', '/assistants', Record, Record>, + '/assistants/create': RouteRecordInfo<'/assistants/create', '/assistants/create', Record, Record>, '/auth/callback': RouteRecordInfo<'/auth/callback', '/auth/callback', Record, Record>, '/auth/login': RouteRecordInfo<'/auth/login', '/auth/login', Record, Record>, '/ping/': RouteRecordInfo<'/ping/', '/ping', Record, Record>,