diff --git a/api/swagger.yaml b/api/swagger.yaml index 26effa5..2f43142 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -29,6 +29,23 @@ definitions: updated_at: type: string type: object + rag-new_internal_entity.AssistantToolType: + properties: + assistant: + $ref: '#/definitions/rag-new_internal_entity.Assistant' + assistant_id: + type: integer + created_at: + type: string + id: + type: integer + tool: + $ref: '#/definitions/rag-new_internal_entity.Tool' + tool_id: + type: integer + updated_at: + type: string + type: object rag-new_internal_entity.Chat: properties: assistant_id: @@ -72,7 +89,7 @@ definitions: created_at: type: string data: - $ref: "#/definitions/rag-new_internal_schema.ToolDiscoveryOutput" + $ref: '#/definitions/rag-new_internal_schema.ToolDiscoveryOutput' description: type: string discovery_url: @@ -97,8 +114,8 @@ definitions: prompt: type: string required: - - description - - name + - description + - name type: object rag-new_internal_schema.ChatCreateRequest: properties: @@ -108,8 +125,8 @@ definitions: maxLength: 255 type: string required: - - assistant_id - - name + - assistant_id + - name type: object rag-new_internal_schema.ChatMessageAddRequest: properties: @@ -117,7 +134,7 @@ definitions: maxLength: 255 type: string required: - - message + - message type: object rag-new_internal_schema.ChatMessageResponse: properties: @@ -160,9 +177,9 @@ definitions: maxLength: 255 type: string required: - - description - - name - - url + - description + - name + - url type: object rag-new_internal_schema.ToolDiscoveryOutput: properties: @@ -172,7 +189,7 @@ definitions: type: string function: items: - $ref: "#/definitions/rag-new_internal_schema.ToolDiscoveryOutputFunctions" + $ref: '#/definitions/rag-new_internal_schema.ToolDiscoveryOutputFunctions' type: array homepage_url: type: string @@ -195,7 +212,7 @@ definitions: properties: function: items: - $ref: "#/definitions/rag-new_internal_schema.ToolDiscoveryOutputFunction" + $ref: '#/definitions/rag-new_internal_schema.ToolDiscoveryOutputFunction' type: array type: type: string @@ -208,594 +225,618 @@ paths: /api/v1/assistants: get: consumes: - - application/json - description: get string by ID + - application/json produces: - - application/json + - application/json responses: "200": description: OK schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - items: - $ref: "#/definitions/rag-new_internal_entity.Assistant" - type: array - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + items: + $ref: '#/definitions/rag-new_internal_entity.Assistant' + type: array + type: object "400": description: Bad Request schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] summary: 获取 Assistant 列表 tags: - - assistant + - assistant post: consumes: - - application/json - description: get string by ID + - application/json parameters: - - description: Assistant - in: body - name: assistant - required: true - schema: - $ref: "#/definitions/rag-new_internal_schema.AssistantCreateRequest" + - description: Assistant + in: body + name: assistant + required: true + schema: + $ref: '#/definitions/rag-new_internal_schema.AssistantCreateRequest' produces: - - application/json + - application/json responses: "200": description: OK schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - $ref: "#/definitions/rag-new_internal_entity.Assistant" - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + $ref: '#/definitions/rag-new_internal_entity.Assistant' + type: object "400": description: Bad Request schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] summary: 创建 Assistant tags: - - assistant + - assistant /api/v1/assistants/{id}: delete: consumes: - - application/json - description: get string by ID + - application/json parameters: - - description: Assistant ID - in: path - name: id - required: true - type: integer + - description: Assistant ID + in: path + name: id + required: true + type: integer produces: - - application/json + - application/json responses: "204": description: No Content "404": description: Not Found schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' "500": description: Internal Server Error schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] summary: 删除 Assistant tags: - - assistant + - assistant + get: + consumes: + - application/json + parameters: + - description: Assistant ID + in: path + name: id + required: true + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + $ref: '#/definitions/rag-new_internal_entity.Assistant' + type: object + "400": + description: Bad Request + schema: + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 获取指定的 Assistant + tags: + - assistant /api/v1/assistants/{id}/tools: get: consumes: - - application/json - description: get string by ID + - application/json parameters: - - description: Assistant ID - in: path - name: id - required: true - type: integer + - description: Assistant ID + in: path + name: id + required: true + type: integer produces: - - application/json + - application/json responses: "200": description: OK schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - items: - $ref: "#/definitions/rag-new_internal_entity.AssistantTool" - type: array - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + items: + $ref: '#/definitions/rag-new_internal_entity.AssistantToolType' + type: array + type: object "500": description: Internal Server Error schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] summary: 获取 Assistant 所绑定的 Tool tags: - - assistant + - assistant /api/v1/assistants/{id}/tools/{tool_id}: delete: consumes: - - application/json - description: get string by ID + - application/json parameters: - - description: Assistant ID - in: path - name: id - required: true - type: integer - - description: Tool ID - in: path - name: tool_id - required: true - type: integer + - description: Assistant ID + in: path + name: id + required: true + type: integer + - description: Tool ID + in: path + name: tool_id + required: true + type: integer produces: - - application/json + - application/json responses: "200": description: OK schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - $ref: "#/definitions/rag-new_internal_entity.AssistantTool" - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + $ref: '#/definitions/rag-new_internal_entity.AssistantTool' + type: object "500": description: Internal Server Error schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] summary: 解绑 Tool tags: - - assistant + - assistant post: consumes: - - application/json - description: get string by ID + - application/json parameters: - - description: Assistant ID - in: path - name: id - required: true - type: integer - - description: Tool ID - in: path - name: tool_id - required: true - type: integer + - description: Assistant ID + in: path + name: id + required: true + type: integer + - description: Tool ID + in: path + name: tool_id + required: true + type: integer produces: - - application/json + - application/json responses: "200": description: OK schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - $ref: "#/definitions/rag-new_internal_entity.AssistantTool" - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + $ref: '#/definitions/rag-new_internal_entity.AssistantTool' + type: object "500": description: Internal Server Error schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] summary: 绑定 Tool tags: - - assistant + - assistant /api/v1/chats: get: consumes: - - application/json + - application/json description: get string by ID produces: - - application/json + - application/json responses: "200": description: OK schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - items: - $ref: "#/definitions/rag-new_internal_entity.Chat" - type: array - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + items: + $ref: '#/definitions/rag-new_internal_entity.Chat' + type: array + type: object "400": description: Bad Request schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' summary: 获取所有 Chat tags: - - chat + - chat post: consumes: - - application/json + - application/json description: get string by ID parameters: - - description: Chat - in: body - name: chat - required: true - schema: - $ref: "#/definitions/rag-new_internal_schema.ChatCreateRequest" + - description: Chat + in: body + name: chat + required: true + schema: + $ref: '#/definitions/rag-new_internal_schema.ChatCreateRequest' produces: - - application/json + - application/json responses: "200": description: OK schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - $ref: "#/definitions/rag-new_internal_entity.Chat" - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + $ref: '#/definitions/rag-new_internal_entity.Chat' + type: object "400": description: Bad Request schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' "500": description: Internal Server Error schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' summary: Create Chat tags: - - chat + - chat /api/v1/chats/{id}: delete: consumes: - - application/json + - application/json description: get string by ID parameters: - - description: Chat ID - in: path - name: id - required: true - type: integer + - description: Chat ID + in: path + name: id + required: true + type: integer produces: - - application/json + - application/json responses: "200": description: OK schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' "400": description: Bad Request schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' "404": description: Not Found schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' "500": description: Internal Server Error schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] summary: Delete Chat tags: - - chat + - chat /api/v1/chats/{id}/messages: get: consumes: - - application/json + - application/json description: get string by ID parameters: - - description: Chat ID - in: path - name: id - required: true - type: integer + - description: Chat ID + in: path + name: id + required: true + type: integer produces: - - application/json + - application/json responses: "200": description: OK schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - items: - $ref: "#/definitions/rag-new_internal_entity.ChatMessage" - type: array - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + items: + $ref: '#/definitions/rag-new_internal_entity.ChatMessage' + type: array + type: object "400": description: Bad Request schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' "404": description: Not Found schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' "500": description: Internal Server Error schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] summary: 查看聊天记录 tags: - - chat_message + - chat_message post: consumes: - - application/json + - application/json description: get string by ID parameters: - - description: Chat ID - in: path - name: id - required: true - type: integer - - description: Message - in: body - name: message - required: true - schema: - $ref: "#/definitions/rag-new_internal_schema.ChatMessageAddRequest" + - description: Chat ID + in: path + name: id + required: true + type: integer + - description: Message + in: body + name: message + required: true + schema: + $ref: '#/definitions/rag-new_internal_schema.ChatMessageAddRequest' produces: - - application/json + - application/json responses: "200": description: OK schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - $ref: "#/definitions/rag-new_internal_schema.ChatMessageResponse" - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + $ref: '#/definitions/rag-new_internal_schema.ChatMessageResponse' + type: object "400": description: Bad Request schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' "404": description: Not Found schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' "409": description: Conflict schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - $ref: "#/definitions/rag-new_internal_schema.ChatMessageResponse" - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + $ref: '#/definitions/rag-new_internal_schema.ChatMessageResponse' + type: object "500": description: Internal Server Error schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] summary: 添加聊天记录 tags: - - chat_message + - chat_message /api/v1/ping: get: consumes: - - application/json + - application/json description: get string by ID produces: - - application/json + - application/json responses: "200": description: OK schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - $ref: "#/definitions/rag-new_internal_schema.CurrentUserResponse" - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + $ref: '#/definitions/rag-new_internal_schema.CurrentUserResponse' + type: object "400": description: Bad Request schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] summary: Greet tags: - - ping + - ping /api/v1/stream/{stream_id}: get: consumes: - - application/json + - application/json description: get string by ID parameters: - - description: Chat ID - in: path - name: id - required: true - type: integer - - description: Chat stream id - in: path - name: stream_id - required: true - type: string + - description: Chat ID + in: path + name: id + required: true + type: integer + - description: Chat stream id + in: path + name: stream_id + required: true + type: string produces: - - application/json + - application/json responses: "200": description: OK schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - $ref: "#/definitions/rag-new_internal_schema.ChatMessageResponse" - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + $ref: '#/definitions/rag-new_internal_schema.ChatMessageResponse' + type: object "400": description: Bad Request schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' "404": description: Not Found schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' "409": description: Conflict schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - $ref: "#/definitions/rag-new_internal_schema.ChatMessageResponse" - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + $ref: '#/definitions/rag-new_internal_schema.ChatMessageResponse' + type: object "500": description: Internal Server Error schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - none: [] + - none: [] summary: 流式传输聊天内容 tags: - - chat_message + - chat_message /api/v1/tools: get: consumes: - - application/json + - application/json description: List tools produces: - - application/json + - application/json responses: "200": description: OK schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - $ref: "#/definitions/rag-new_internal_schema.CurrentUserResponse" - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + items: + $ref: '#/definitions/rag-new_internal_entity.Tool' + type: array + type: object "400": description: Bad Request schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] summary: List Tool tags: - - tool + - tool post: consumes: - - application/json + - application/json description: Create tool parameters: - - description: Tool - in: body - name: tool - required: true - schema: - $ref: "#/definitions/rag-new_internal_schema.ToolCreateRequest" + - description: Tool + in: body + name: tool + required: true + schema: + $ref: '#/definitions/rag-new_internal_schema.ToolCreateRequest' produces: - - application/json + - application/json responses: "200": description: OK schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - items: - $ref: "#/definitions/rag-new_internal_entity.Tool" - type: array - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + $ref: '#/definitions/rag-new_internal_entity.Tool' + type: object "400": description: Bad Request schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] summary: Create Tool tags: - - tool + - tool /api/v1/tools/{id}: delete: consumes: - - application/json + - application/json description: DeleteTool parameters: - - description: Tool ID - in: path - name: id - required: true - type: string + - description: Tool ID + in: path + name: id + required: true + type: integer produces: - - application/json + - application/json responses: "200": description: OK "400": description: Bad Request schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' "404": description: Not Found schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] summary: DeleteTool tags: - - tool + - tool get: consumes: - - application/json + - application/json description: Get tool parameters: - - description: Tool ID - in: path - name: id - required: true - type: string + - description: Tool ID + in: path + name: id + required: true + type: integer produces: - - application/json + - application/json responses: "200": description: OK schema: allOf: - - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" - - properties: - data: - $ref: "#/definitions/rag-new_internal_entity.Tool" - type: object + - $ref: '#/definitions/rag-new_internal_schema.ResponseBody' + - properties: + data: + $ref: '#/definitions/rag-new_internal_entity.Tool' + type: object "400": description: Bad Request schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' "404": description: Not Found schema: - $ref: "#/definitions/rag-new_internal_schema.ResponseBody" + $ref: '#/definitions/rag-new_internal_schema.ResponseBody' security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] summary: Get Tool tags: - - tool + - tool securityDefinitions: ApiKeyAuth: in: header diff --git a/index.html b/index.html index f450a73..7263b95 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - Welcome to Vuetify 3 + Leaflow Amber diff --git a/src/api/api.ts b/src/api/api.ts index 584c894..f953ff1 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -5,1520 +5,1371 @@ * 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"; + +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"; +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"; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; /** - * + * * @export * @interface ApiV1AssistantsGet200Response */ export interface ApiV1AssistantsGet200Response { - /** - * - * @type {Array} - * @memberof ApiV1AssistantsGet200Response - */ - data?: Array; - /** - * - * @type {string} - * @memberof ApiV1AssistantsGet200Response - */ - error?: string; - /** - * - * @type {string} - * @memberof ApiV1AssistantsGet200Response - */ - message?: string; - /** - * - * @type {boolean} - * @memberof ApiV1AssistantsGet200Response - */ - success?: boolean; + /** + * + * @type {Array} + * @memberof ApiV1AssistantsGet200Response + */ + 'data'?: Array; + /** + * + * @type {string} + * @memberof ApiV1AssistantsGet200Response + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof ApiV1AssistantsGet200Response + */ + 'message'?: string; + /** + * + * @type {boolean} + * @memberof ApiV1AssistantsGet200Response + */ + 'success'?: boolean; } /** - * + * * @export * @interface ApiV1AssistantsIdToolsGet200Response */ export interface ApiV1AssistantsIdToolsGet200Response { - /** - * - * @type {Array} - * @memberof ApiV1AssistantsIdToolsGet200Response - */ - data?: Array; - /** - * - * @type {string} - * @memberof ApiV1AssistantsIdToolsGet200Response - */ - error?: string; - /** - * - * @type {string} - * @memberof ApiV1AssistantsIdToolsGet200Response - */ - message?: string; - /** - * - * @type {boolean} - * @memberof ApiV1AssistantsIdToolsGet200Response - */ - success?: boolean; + /** + * + * @type {Array} + * @memberof ApiV1AssistantsIdToolsGet200Response + */ + 'data'?: Array; + /** + * + * @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 {RagNewInternalEntityAssistantTool} - * @memberof ApiV1AssistantsIdToolsToolIdPost200Response - */ - data?: RagNewInternalEntityAssistantTool; - /** - * - * @type {string} - * @memberof ApiV1AssistantsIdToolsToolIdPost200Response - */ - error?: string; - /** - * - * @type {string} - * @memberof ApiV1AssistantsIdToolsToolIdPost200Response - */ - message?: string; - /** - * - * @type {boolean} - * @memberof ApiV1AssistantsIdToolsToolIdPost200Response - */ - success?: boolean; + /** + * + * @type {RagNewInternalEntityAssistantTool} + * @memberof ApiV1AssistantsIdToolsToolIdPost200Response + */ + 'data'?: RagNewInternalEntityAssistantTool; + /** + * + * @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 {RagNewInternalEntityAssistant} - * @memberof ApiV1AssistantsPost200Response - */ - data?: RagNewInternalEntityAssistant; - /** - * - * @type {string} - * @memberof ApiV1AssistantsPost200Response - */ - error?: string; - /** - * - * @type {string} - * @memberof ApiV1AssistantsPost200Response - */ - message?: string; - /** - * - * @type {boolean} - * @memberof ApiV1AssistantsPost200Response - */ - success?: boolean; + /** + * + * @type {RagNewInternalEntityAssistant} + * @memberof ApiV1AssistantsPost200Response + */ + 'data'?: RagNewInternalEntityAssistant; + /** + * + * @type {string} + * @memberof ApiV1AssistantsPost200Response + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof ApiV1AssistantsPost200Response + */ + 'message'?: string; + /** + * + * @type {boolean} + * @memberof ApiV1AssistantsPost200Response + */ + 'success'?: boolean; } /** - * + * * @export * @interface ApiV1ChatsGet200Response */ export interface ApiV1ChatsGet200Response { - /** - * - * @type {Array} - * @memberof ApiV1ChatsGet200Response - */ - data?: Array; - /** - * - * @type {string} - * @memberof ApiV1ChatsGet200Response - */ - error?: string; - /** - * - * @type {string} - * @memberof ApiV1ChatsGet200Response - */ - message?: string; - /** - * - * @type {boolean} - * @memberof ApiV1ChatsGet200Response - */ - success?: boolean; + /** + * + * @type {Array} + * @memberof ApiV1ChatsGet200Response + */ + 'data'?: Array; + /** + * + * @type {string} + * @memberof ApiV1ChatsGet200Response + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof ApiV1ChatsGet200Response + */ + 'message'?: string; + /** + * + * @type {boolean} + * @memberof ApiV1ChatsGet200Response + */ + 'success'?: boolean; } /** - * + * * @export * @interface ApiV1ChatsIdMessagesGet200Response */ export interface ApiV1ChatsIdMessagesGet200Response { - /** - * - * @type {Array} - * @memberof ApiV1ChatsIdMessagesGet200Response - */ - data?: Array; - /** - * - * @type {string} - * @memberof ApiV1ChatsIdMessagesGet200Response - */ - error?: string; - /** - * - * @type {string} - * @memberof ApiV1ChatsIdMessagesGet200Response - */ - message?: string; - /** - * - * @type {boolean} - * @memberof ApiV1ChatsIdMessagesGet200Response - */ - success?: boolean; + /** + * + * @type {Array} + * @memberof ApiV1ChatsIdMessagesGet200Response + */ + 'data'?: Array; + /** + * + * @type {string} + * @memberof ApiV1ChatsIdMessagesGet200Response + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof ApiV1ChatsIdMessagesGet200Response + */ + 'message'?: string; + /** + * + * @type {boolean} + * @memberof ApiV1ChatsIdMessagesGet200Response + */ + 'success'?: boolean; } /** - * + * * @export * @interface ApiV1ChatsIdMessagesPost200Response */ export interface ApiV1ChatsIdMessagesPost200Response { - /** - * - * @type {RagNewInternalSchemaChatMessageResponse} - * @memberof ApiV1ChatsIdMessagesPost200Response - */ - data?: RagNewInternalSchemaChatMessageResponse; - /** - * - * @type {string} - * @memberof ApiV1ChatsIdMessagesPost200Response - */ - error?: string; - /** - * - * @type {string} - * @memberof ApiV1ChatsIdMessagesPost200Response - */ - message?: string; - /** - * - * @type {boolean} - * @memberof ApiV1ChatsIdMessagesPost200Response - */ - success?: boolean; + /** + * + * @type {RagNewInternalSchemaChatMessageResponse} + * @memberof ApiV1ChatsIdMessagesPost200Response + */ + 'data'?: RagNewInternalSchemaChatMessageResponse; + /** + * + * @type {string} + * @memberof ApiV1ChatsIdMessagesPost200Response + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof ApiV1ChatsIdMessagesPost200Response + */ + 'message'?: string; + /** + * + * @type {boolean} + * @memberof ApiV1ChatsIdMessagesPost200Response + */ + 'success'?: boolean; } /** - * + * * @export * @interface ApiV1ChatsPost200Response */ export interface ApiV1ChatsPost200Response { - /** - * - * @type {RagNewInternalEntityChat} - * @memberof ApiV1ChatsPost200Response - */ - data?: RagNewInternalEntityChat; - /** - * - * @type {string} - * @memberof ApiV1ChatsPost200Response - */ - error?: string; - /** - * - * @type {string} - * @memberof ApiV1ChatsPost200Response - */ - message?: string; - /** - * - * @type {boolean} - * @memberof ApiV1ChatsPost200Response - */ - success?: boolean; + /** + * + * @type {RagNewInternalEntityChat} + * @memberof ApiV1ChatsPost200Response + */ + 'data'?: RagNewInternalEntityChat; + /** + * + * @type {string} + * @memberof ApiV1ChatsPost200Response + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof ApiV1ChatsPost200Response + */ + 'message'?: string; + /** + * + * @type {boolean} + * @memberof ApiV1ChatsPost200Response + */ + 'success'?: boolean; } /** - * + * * @export * @interface ApiV1PingGet200Response */ export interface ApiV1PingGet200Response { - /** - * - * @type {RagNewInternalSchemaCurrentUserResponse} - * @memberof ApiV1PingGet200Response - */ - data?: RagNewInternalSchemaCurrentUserResponse; - /** - * - * @type {string} - * @memberof ApiV1PingGet200Response - */ - error?: string; - /** - * - * @type {string} - * @memberof ApiV1PingGet200Response - */ - message?: string; - /** - * - * @type {boolean} - * @memberof ApiV1PingGet200Response - */ - success?: boolean; + /** + * + * @type {RagNewInternalSchemaCurrentUserResponse} + * @memberof ApiV1PingGet200Response + */ + 'data'?: RagNewInternalSchemaCurrentUserResponse; + /** + * + * @type {string} + * @memberof ApiV1PingGet200Response + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof ApiV1PingGet200Response + */ + 'message'?: string; + /** + * + * @type {boolean} + * @memberof ApiV1PingGet200Response + */ + 'success'?: boolean; } /** - * + * * @export - * @interface ApiV1ToolsIdGet200Response + * @interface ApiV1ToolsGet200Response */ -export interface ApiV1ToolsIdGet200Response { - /** - * - * @type {RagNewInternalEntityTool} - * @memberof ApiV1ToolsIdGet200Response - */ - data?: RagNewInternalEntityTool; - /** - * - * @type {string} - * @memberof ApiV1ToolsIdGet200Response - */ - error?: string; - /** - * - * @type {string} - * @memberof ApiV1ToolsIdGet200Response - */ - message?: string; - /** - * - * @type {boolean} - * @memberof ApiV1ToolsIdGet200Response - */ - success?: boolean; +export interface ApiV1ToolsGet200Response { + /** + * + * @type {Array} + * @memberof ApiV1ToolsGet200Response + */ + 'data'?: Array; + /** + * + * @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 {Array} - * @memberof ApiV1ToolsPost200Response - */ - data?: Array; - /** - * - * @type {string} - * @memberof ApiV1ToolsPost200Response - */ - error?: string; - /** - * - * @type {string} - * @memberof ApiV1ToolsPost200Response - */ - message?: string; - /** - * - * @type {boolean} - * @memberof ApiV1ToolsPost200Response - */ - success?: boolean; + /** + * + * @type {RagNewInternalEntityTool} + * @memberof ApiV1ToolsPost200Response + */ + 'data'?: RagNewInternalEntityTool; + /** + * + * @type {string} + * @memberof ApiV1ToolsPost200Response + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof ApiV1ToolsPost200Response + */ + 'message'?: string; + /** + * + * @type {boolean} + * @memberof ApiV1ToolsPost200Response + */ + 'success'?: boolean; } /** - * + * * @export * @interface RagNewInternalEntityAssistant */ export interface RagNewInternalEntityAssistant { - /** - * - * @type {string} - * @memberof RagNewInternalEntityAssistant - */ - created_at?: string; - /** - * - * @type {string} - * @memberof RagNewInternalEntityAssistant - */ - description?: string; - /** - * - * @type {number} - * @memberof RagNewInternalEntityAssistant - */ - id?: number; - /** - * - * @type {string} - * @memberof RagNewInternalEntityAssistant - */ - name?: string; - /** - * - * @type {string} - * @memberof RagNewInternalEntityAssistant - */ - prompt?: string; - /** - * - * @type {string} - * @memberof RagNewInternalEntityAssistant - */ - updated_at?: string; - /** - * - * @type {number} - * @memberof RagNewInternalEntityAssistant - */ - user_id?: number; + /** + * + * @type {string} + * @memberof RagNewInternalEntityAssistant + */ + 'created_at'?: string; + /** + * + * @type {string} + * @memberof RagNewInternalEntityAssistant + */ + 'description'?: string; + /** + * + * @type {number} + * @memberof RagNewInternalEntityAssistant + */ + 'id'?: number; + /** + * + * @type {string} + * @memberof RagNewInternalEntityAssistant + */ + 'name'?: string; + /** + * + * @type {string} + * @memberof RagNewInternalEntityAssistant + */ + 'prompt'?: string; + /** + * + * @type {string} + * @memberof RagNewInternalEntityAssistant + */ + 'updated_at'?: string; + /** + * + * @type {number} + * @memberof RagNewInternalEntityAssistant + */ + 'user_id'?: number; } /** - * + * * @export * @interface RagNewInternalEntityAssistantTool */ export interface RagNewInternalEntityAssistantTool { - /** - * - * @type {number} - * @memberof RagNewInternalEntityAssistantTool - */ - assistant_id?: number; - /** - * - * @type {string} - * @memberof RagNewInternalEntityAssistantTool - */ - created_at?: string; - /** - * - * @type {number} - * @memberof RagNewInternalEntityAssistantTool - */ - id?: number; - /** - * - * @type {number} - * @memberof RagNewInternalEntityAssistantTool - */ - tool_id?: number; - /** - * - * @type {string} - * @memberof RagNewInternalEntityAssistantTool - */ - updated_at?: string; + /** + * + * @type {number} + * @memberof RagNewInternalEntityAssistantTool + */ + 'assistant_id'?: number; + /** + * + * @type {string} + * @memberof RagNewInternalEntityAssistantTool + */ + 'created_at'?: string; + /** + * + * @type {number} + * @memberof RagNewInternalEntityAssistantTool + */ + 'id'?: number; + /** + * + * @type {number} + * @memberof RagNewInternalEntityAssistantTool + */ + 'tool_id'?: number; + /** + * + * @type {string} + * @memberof RagNewInternalEntityAssistantTool + */ + 'updated_at'?: string; } /** - * + * + * @export + * @interface RagNewInternalEntityAssistantToolType + */ +export interface RagNewInternalEntityAssistantToolType { + /** + * + * @type {RagNewInternalEntityAssistant} + * @memberof RagNewInternalEntityAssistantToolType + */ + 'assistant'?: RagNewInternalEntityAssistant; + /** + * + * @type {number} + * @memberof RagNewInternalEntityAssistantToolType + */ + 'assistant_id'?: number; + /** + * + * @type {string} + * @memberof RagNewInternalEntityAssistantToolType + */ + 'created_at'?: string; + /** + * + * @type {number} + * @memberof RagNewInternalEntityAssistantToolType + */ + 'id'?: number; + /** + * + * @type {RagNewInternalEntityTool} + * @memberof RagNewInternalEntityAssistantToolType + */ + 'tool'?: RagNewInternalEntityTool; + /** + * + * @type {number} + * @memberof RagNewInternalEntityAssistantToolType + */ + 'tool_id'?: number; + /** + * + * @type {string} + * @memberof RagNewInternalEntityAssistantToolType + */ + 'updated_at'?: string; +} +/** + * * @export * @interface RagNewInternalEntityChat */ export interface RagNewInternalEntityChat { - /** - * - * @type {number} - * @memberof RagNewInternalEntityChat - */ - assistant_id?: number; - /** - * - * @type {string} - * @memberof RagNewInternalEntityChat - */ - created_at?: string; - /** - * - * @type {number} - * @memberof RagNewInternalEntityChat - */ - id?: number; - /** - * - * @type {string} - * @memberof RagNewInternalEntityChat - */ - name?: string; - /** - * - * @type {string} - * @memberof RagNewInternalEntityChat - */ - updated_at?: string; - /** - * - * @type {number} - * @memberof RagNewInternalEntityChat - */ - user_id?: number; + /** + * + * @type {number} + * @memberof RagNewInternalEntityChat + */ + 'assistant_id'?: number; + /** + * + * @type {string} + * @memberof RagNewInternalEntityChat + */ + 'created_at'?: string; + /** + * + * @type {number} + * @memberof RagNewInternalEntityChat + */ + 'id'?: number; + /** + * + * @type {string} + * @memberof RagNewInternalEntityChat + */ + 'name'?: string; + /** + * + * @type {string} + * @memberof RagNewInternalEntityChat + */ + 'updated_at'?: string; + /** + * + * @type {number} + * @memberof RagNewInternalEntityChat + */ + 'user_id'?: number; } /** - * + * * @export * @interface RagNewInternalEntityChatMessage */ export interface RagNewInternalEntityChatMessage { - /** - * - * @type {number} - * @memberof RagNewInternalEntityChatMessage - */ - assistant_id?: number; - /** - * - * @type {string} - * @memberof RagNewInternalEntityChatMessage - */ - content?: string; - /** - * - * @type {string} - * @memberof RagNewInternalEntityChatMessage - */ - created_at?: string; - /** - * - * @type {number} - * @memberof RagNewInternalEntityChatMessage - */ - id?: number; - /** - * - * @type {number} - * @memberof RagNewInternalEntityChatMessage - */ - input_tokens?: number; - /** - * - * @type {number} - * @memberof RagNewInternalEntityChatMessage - */ - output_tokens?: number; - /** - * - * @type {string} - * @memberof RagNewInternalEntityChatMessage - */ - role?: string; - /** - * - * @type {number} - * @memberof RagNewInternalEntityChatMessage - */ - total_tokens?: number; - /** - * - * @type {string} - * @memberof RagNewInternalEntityChatMessage - */ - updated_at?: string; + /** + * + * @type {number} + * @memberof RagNewInternalEntityChatMessage + */ + 'assistant_id'?: number; + /** + * + * @type {string} + * @memberof RagNewInternalEntityChatMessage + */ + 'content'?: string; + /** + * + * @type {string} + * @memberof RagNewInternalEntityChatMessage + */ + 'created_at'?: string; + /** + * + * @type {number} + * @memberof RagNewInternalEntityChatMessage + */ + 'id'?: number; + /** + * + * @type {number} + * @memberof RagNewInternalEntityChatMessage + */ + 'input_tokens'?: number; + /** + * + * @type {number} + * @memberof RagNewInternalEntityChatMessage + */ + 'output_tokens'?: number; + /** + * + * @type {string} + * @memberof RagNewInternalEntityChatMessage + */ + 'role'?: string; + /** + * + * @type {number} + * @memberof RagNewInternalEntityChatMessage + */ + 'total_tokens'?: number; + /** + * + * @type {string} + * @memberof RagNewInternalEntityChatMessage + */ + 'updated_at'?: string; } /** - * + * * @export * @interface RagNewInternalEntityTool */ export interface RagNewInternalEntityTool { - /** - * - * @type {string} - * @memberof RagNewInternalEntityTool - */ - api_key?: string; - /** - * - * @type {string} - * @memberof RagNewInternalEntityTool - */ - created_at?: string; - /** - * - * @type {RagNewInternalSchemaToolDiscoveryOutput} - * @memberof RagNewInternalEntityTool - */ - data?: RagNewInternalSchemaToolDiscoveryOutput; - /** - * - * @type {string} - * @memberof RagNewInternalEntityTool - */ - description?: string; - /** - * - * @type {string} - * @memberof RagNewInternalEntityTool - */ - discovery_url?: string; - /** - * - * @type {number} - * @memberof RagNewInternalEntityTool - */ - id?: number; - /** - * - * @type {string} - * @memberof RagNewInternalEntityTool - */ - name?: string; - /** - * - * @type {string} - * @memberof RagNewInternalEntityTool - */ - updated_at?: string; - /** - * - * @type {number} - * @memberof RagNewInternalEntityTool - */ - user_id?: number; + /** + * + * @type {string} + * @memberof RagNewInternalEntityTool + */ + 'api_key'?: string; + /** + * + * @type {string} + * @memberof RagNewInternalEntityTool + */ + 'created_at'?: string; + /** + * + * @type {RagNewInternalSchemaToolDiscoveryOutput} + * @memberof RagNewInternalEntityTool + */ + 'data'?: RagNewInternalSchemaToolDiscoveryOutput; + /** + * + * @type {string} + * @memberof RagNewInternalEntityTool + */ + 'description'?: string; + /** + * + * @type {string} + * @memberof RagNewInternalEntityTool + */ + 'discovery_url'?: string; + /** + * + * @type {number} + * @memberof RagNewInternalEntityTool + */ + 'id'?: number; + /** + * + * @type {string} + * @memberof RagNewInternalEntityTool + */ + 'name'?: string; + /** + * + * @type {string} + * @memberof RagNewInternalEntityTool + */ + 'updated_at'?: string; + /** + * + * @type {number} + * @memberof RagNewInternalEntityTool + */ + 'user_id'?: number; } /** - * + * * @export * @interface RagNewInternalSchemaAssistantCreateRequest */ export interface RagNewInternalSchemaAssistantCreateRequest { - /** - * - * @type {string} - * @memberof RagNewInternalSchemaAssistantCreateRequest - */ - description: string; - /** - * - * @type {string} - * @memberof RagNewInternalSchemaAssistantCreateRequest - */ - name: string; - /** - * - * @type {string} - * @memberof RagNewInternalSchemaAssistantCreateRequest - */ - prompt?: string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaAssistantCreateRequest + */ + 'description': string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaAssistantCreateRequest + */ + 'name': string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaAssistantCreateRequest + */ + 'prompt'?: string; } /** - * + * * @export * @interface RagNewInternalSchemaChatCreateRequest */ export interface RagNewInternalSchemaChatCreateRequest { - /** - * - * @type {number} - * @memberof RagNewInternalSchemaChatCreateRequest - */ - assistant_id: number; - /** - * - * @type {string} - * @memberof RagNewInternalSchemaChatCreateRequest - */ - name: string; + /** + * + * @type {number} + * @memberof RagNewInternalSchemaChatCreateRequest + */ + 'assistant_id': number; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaChatCreateRequest + */ + 'name': string; } /** - * + * * @export * @interface RagNewInternalSchemaChatMessageAddRequest */ export interface RagNewInternalSchemaChatMessageAddRequest { - /** - * - * @type {string} - * @memberof RagNewInternalSchemaChatMessageAddRequest - */ - message: string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaChatMessageAddRequest + */ + 'message': string; } /** - * + * * @export * @interface RagNewInternalSchemaChatMessageResponse */ export interface RagNewInternalSchemaChatMessageResponse { - /** - * - * @type {string} - * @memberof RagNewInternalSchemaChatMessageResponse - */ - stream_id?: string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaChatMessageResponse + */ + 'stream_id'?: string; } /** - * + * * @export * @interface RagNewInternalSchemaCurrentUserResponse */ export interface RagNewInternalSchemaCurrentUserResponse { - /** - * - * @type {string} - * @memberof RagNewInternalSchemaCurrentUserResponse - */ - ip?: string; - /** - * - * @type {string} - * @memberof RagNewInternalSchemaCurrentUserResponse - */ - userEmail?: string; - /** - * - * @type {number} - * @memberof RagNewInternalSchemaCurrentUserResponse - */ - userId?: number; - /** - * - * @type {boolean} - * @memberof RagNewInternalSchemaCurrentUserResponse - */ - valid?: boolean; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaCurrentUserResponse + */ + 'ip'?: string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaCurrentUserResponse + */ + 'userEmail'?: string; + /** + * + * @type {number} + * @memberof RagNewInternalSchemaCurrentUserResponse + */ + 'userId'?: number; + /** + * + * @type {boolean} + * @memberof RagNewInternalSchemaCurrentUserResponse + */ + 'valid'?: boolean; } /** - * + * * @export * @interface RagNewInternalSchemaResponseBody */ export interface RagNewInternalSchemaResponseBody { - /** - * - * @type {object} - * @memberof RagNewInternalSchemaResponseBody - */ - data?: object; - /** - * - * @type {string} - * @memberof RagNewInternalSchemaResponseBody - */ - error?: string; - /** - * - * @type {string} - * @memberof RagNewInternalSchemaResponseBody - */ - message?: string; - /** - * - * @type {boolean} - * @memberof RagNewInternalSchemaResponseBody - */ - success?: boolean; + /** + * + * @type {object} + * @memberof RagNewInternalSchemaResponseBody + */ + 'data'?: object; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaResponseBody + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaResponseBody + */ + 'message'?: string; + /** + * + * @type {boolean} + * @memberof RagNewInternalSchemaResponseBody + */ + 'success'?: boolean; } /** - * + * * @export * @interface RagNewInternalSchemaToolCreateRequest */ export interface RagNewInternalSchemaToolCreateRequest { - /** - * - * @type {string} - * @memberof RagNewInternalSchemaToolCreateRequest - */ - api_key?: string; - /** - * - * @type {string} - * @memberof RagNewInternalSchemaToolCreateRequest - */ - description: string; - /** - * - * @type {string} - * @memberof RagNewInternalSchemaToolCreateRequest - */ - name: string; - /** - * - * @type {string} - * @memberof RagNewInternalSchemaToolCreateRequest - */ - url: string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaToolCreateRequest + */ + 'api_key'?: string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaToolCreateRequest + */ + 'description': string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaToolCreateRequest + */ + 'name': string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaToolCreateRequest + */ + 'url': string; } /** - * + * * @export * @interface RagNewInternalSchemaToolDiscoveryOutput */ export interface RagNewInternalSchemaToolDiscoveryOutput { - /** - * - * @type {string} - * @memberof RagNewInternalSchemaToolDiscoveryOutput - */ - callback_url?: string; - /** - * - * @type {string} - * @memberof RagNewInternalSchemaToolDiscoveryOutput - */ - description?: string; - /** - * - * @type {Array} - * @memberof RagNewInternalSchemaToolDiscoveryOutput - */ - function?: Array; - /** - * - * @type {string} - * @memberof RagNewInternalSchemaToolDiscoveryOutput - */ - homepage_url?: string; - /** - * - * @type {string} - * @memberof RagNewInternalSchemaToolDiscoveryOutput - */ - name?: string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaToolDiscoveryOutput + */ + 'callback_url'?: string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaToolDiscoveryOutput + */ + 'description'?: string; + /** + * + * @type {Array} + * @memberof RagNewInternalSchemaToolDiscoveryOutput + */ + 'function'?: Array; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaToolDiscoveryOutput + */ + 'homepage_url'?: string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaToolDiscoveryOutput + */ + 'name'?: string; } /** - * + * * @export * @interface RagNewInternalSchemaToolDiscoveryOutputFunction */ export interface RagNewInternalSchemaToolDiscoveryOutputFunction { - /** - * - * @type {string} - * @memberof RagNewInternalSchemaToolDiscoveryOutputFunction - */ - description?: string; - /** - * - * @type {string} - * @memberof RagNewInternalSchemaToolDiscoveryOutputFunction - */ - name?: string; - /** - * - * @type {object} - * @memberof RagNewInternalSchemaToolDiscoveryOutputFunction - */ - parameters?: object; - /** - * - * @type {Array} - * @memberof RagNewInternalSchemaToolDiscoveryOutputFunction - */ - required?: Array; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaToolDiscoveryOutputFunction + */ + 'description'?: string; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaToolDiscoveryOutputFunction + */ + 'name'?: string; + /** + * + * @type {object} + * @memberof RagNewInternalSchemaToolDiscoveryOutputFunction + */ + 'parameters'?: object; + /** + * + * @type {Array} + * @memberof RagNewInternalSchemaToolDiscoveryOutputFunction + */ + 'required'?: Array; } /** - * + * * @export * @interface RagNewInternalSchemaToolDiscoveryOutputFunctions */ export interface RagNewInternalSchemaToolDiscoveryOutputFunctions { - /** - * - * @type {Array} - * @memberof RagNewInternalSchemaToolDiscoveryOutputFunctions - */ - function?: Array; - /** - * - * @type {string} - * @memberof RagNewInternalSchemaToolDiscoveryOutputFunctions - */ - type?: string; + /** + * + * @type {Array} + * @memberof RagNewInternalSchemaToolDiscoveryOutputFunctions + */ + 'function'?: Array; + /** + * + * @type {string} + * @memberof RagNewInternalSchemaToolDiscoveryOutputFunctions + */ + 'type'?: string; } /** * AssistantApi - axios parameter creator * @export */ -export const AssistantApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * get string by ID - * @summary 获取 Assistant 列表 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1AssistantsGet: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - 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; - } +export const AssistantApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary 获取 Assistant 列表 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1AssistantsGet: async (options: RawAxiosRequestConfig = {}): Promise => { + 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; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - // authentication ApiKeyAuth required - await setApiKeyToObject( - localVarHeaderParameter, - "Authorization", - configuration, - ); + // 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 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; - } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const localVarRequestOptions = { - method: "DELETE", - ...baseOptions, - ...options, - }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + 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 => { + // 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; + } - // authentication ApiKeyAuth required - await setApiKeyToObject( - localVarHeaderParameter, - "Authorization", - configuration, - ); + const localVarRequestOptions = { method: 'DELETE', ...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, - }; + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * get string by ID - * @summary 获取 Assistant 所绑定的 Tool - * @param {number} id Assistant ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1AssistantsIdToolsGet: async ( - id: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // 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; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - // authentication ApiKeyAuth required - await setApiKeyToObject( - localVarHeaderParameter, - "Authorization", - configuration, - ); + 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 => { + // 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; + } - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * get string by ID - * @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 => { - // 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; - } + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - 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}; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取 Assistant 所绑定的 Tool + * @param {number} id Assistant ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1AssistantsIdToolsGet: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { + // 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; + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * get string by ID - * @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 => { - // 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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - const localVarRequestOptions = { - method: "POST", - ...baseOptions, - ...options, - }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - // authentication ApiKeyAuth required - await setApiKeyToObject( - localVarHeaderParameter, - "Authorization", - configuration, - ); - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; + + 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 {RagNewInternalSchemaAssistantCreateRequest} assistant Assistant - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1AssistantsPost: async ( - assistant: RagNewInternalSchemaAssistantCreateRequest, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // 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; - } + 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 => { + // 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: "POST", - ...baseOptions, - ...options, - }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - // authentication ApiKeyAuth required - await setApiKeyToObject( - localVarHeaderParameter, - "Authorization", - configuration, - ); + // 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, - ); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + 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 => { + // 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 {RagNewInternalSchemaAssistantCreateRequest} assistant Assistant + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1AssistantsPost: async (assistant: RagNewInternalSchemaAssistantCreateRequest, options: RawAxiosRequestConfig = {}): Promise => { + // 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, + }; + }, + } }; /** * AssistantApi - functional programming interface * @export */ -export const AssistantApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - AssistantApiAxiosParamCreator(configuration); - return { - /** - * get string by ID - * @summary 获取 Assistant 列表 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiV1AssistantsGet( - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - 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); - }, - /** - * 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 - * @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 - > { - 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); - }, - /** - * get string by ID - * @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 - > { - 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); - }, - /** - * get string by ID - * @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 - > { - 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); - }, - /** - * get string by ID - * @summary 创建 Assistant - * @param {RagNewInternalSchemaAssistantCreateRequest} assistant Assistant - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiV1AssistantsPost( - assistant: RagNewInternalSchemaAssistantCreateRequest, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - 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); - }, - }; +export const AssistantApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AssistantApiAxiosParamCreator(configuration) + return { + /** + * + * @summary 获取 Assistant 列表 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV1AssistantsGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + 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> { + 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> { + 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); + }, + /** + * + * @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> { + 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> { + 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> { + 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 {RagNewInternalSchemaAssistantCreateRequest} assistant Assistant + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV1AssistantsPost(assistant: RagNewInternalSchemaAssistantCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + 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); + }, + } }; /** * AssistantApi - factory interface * @export */ -export const AssistantApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = AssistantApiFp(configuration); - return { - /** - * get string by ID - * @summary 获取 Assistant 列表 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - 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 - * @param {number} id Assistant ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1AssistantsIdToolsGet( - id: number, - options?: any, - ): AxiosPromise { - return localVarFp - .apiV1AssistantsIdToolsGet(id, options) - .then((request) => request(axios, basePath)); - }, - /** - * get string by ID - * @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?: any, - ): AxiosPromise { - return localVarFp - .apiV1AssistantsIdToolsToolIdDelete(id, toolId, options) - .then((request) => request(axios, basePath)); - }, - /** - * get string by ID - * @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?: any, - ): AxiosPromise { - return localVarFp - .apiV1AssistantsIdToolsToolIdPost(id, toolId, options) - .then((request) => request(axios, basePath)); - }, - /** - * get string by ID - * @summary 创建 Assistant - * @param {RagNewInternalSchemaAssistantCreateRequest} assistant Assistant - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1AssistantsPost( - assistant: RagNewInternalSchemaAssistantCreateRequest, - options?: any, - ): AxiosPromise { - return localVarFp - .apiV1AssistantsPost(assistant, options) - .then((request) => request(axios, basePath)); - }, - }; +export const AssistantApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AssistantApiFp(configuration) + return { + /** + * + * @summary 获取 Assistant 列表 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1AssistantsGet(options?: any): AxiosPromise { + 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?: any): AxiosPromise { + 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?: any): AxiosPromise { + return localVarFp.apiV1AssistantsIdGet(id, 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?: any): AxiosPromise { + 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?: any): AxiosPromise { + 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?: any): AxiosPromise { + return localVarFp.apiV1AssistantsIdToolsToolIdPost(id, toolId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 创建 Assistant + * @param {RagNewInternalSchemaAssistantCreateRequest} assistant Assistant + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1AssistantsPost(assistant: RagNewInternalSchemaAssistantCreateRequest, options?: any): AxiosPromise { + return localVarFp.apiV1AssistantsPost(assistant, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -1528,415 +1379,291 @@ export const AssistantApiFactory = function ( * @extends {BaseAPI} */ export class AssistantApi extends BaseAPI { - /** - * get string by ID - * @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 {*} [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)); + } - /** - * 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)); - } + /** + * + * @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 - * @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 获取指定的 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)); + } - /** - * get string by ID - * @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 获取 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)); + } - /** - * get string by ID - * @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 解绑 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)); + } - /** - * get string by ID - * @summary 创建 Assistant - * @param {RagNewInternalSchemaAssistantCreateRequest} assistant Assistant - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AssistantApi - */ - public apiV1AssistantsPost( - assistant: RagNewInternalSchemaAssistantCreateRequest, - options?: RawAxiosRequestConfig, - ) { - return AssistantApiFp(this.configuration) - .apiV1AssistantsPost(assistant, 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 {RagNewInternalSchemaAssistantCreateRequest} assistant Assistant + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AssistantApi + */ + public apiV1AssistantsPost(assistant: RagNewInternalSchemaAssistantCreateRequest, options?: RawAxiosRequestConfig) { + return AssistantApiFp(this.configuration).apiV1AssistantsPost(assistant, options).then((request) => request(this.axios, this.basePath)); + } } + + /** * ChatApi - axios parameter creator * @export */ -export const ChatApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * get string by ID - * @summary 获取所有 Chat - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ChatsGet: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - 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; - } +export const ChatApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * get string by ID + * @summary 获取所有 Chat + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1ChatsGet: async (options: RawAxiosRequestConfig = {}): Promise => { + 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; + 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, - }; - }, - /** - * get string by ID - * @summary Delete Chat - * @param {number} id Chat ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ChatsIdDelete: async ( - id: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // 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; - } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const localVarRequestOptions = { - method: "DELETE", - ...baseOptions, - ...options, - }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * get string by ID + * @summary Delete Chat + * @param {number} id Chat ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1ChatsIdDelete: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { + // 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; + } - // authentication ApiKeyAuth required - await setApiKeyToObject( - localVarHeaderParameter, - "Authorization", - configuration, - ); + const localVarRequestOptions = { method: 'DELETE', ...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, - }; + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * get string by ID - * @summary Create Chat - * @param {RagNewInternalSchemaChatCreateRequest} chat Chat - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ChatsPost: async ( - chat: RagNewInternalSchemaChatCreateRequest, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // 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; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarHeaderParameter["Content-Type"] = "application/json"; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * get string by ID + * @summary Create Chat + * @param {RagNewInternalSchemaChatCreateRequest} chat Chat + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1ChatsPost: async (chat: RagNewInternalSchemaChatCreateRequest, options: RawAxiosRequestConfig = {}): Promise => { + // 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; + } - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - localVarRequestOptions.data = serializeDataIfNeeded( - chat, - localVarRequestOptions, - configuration, - ); + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + + + 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 { - /** - * get string by ID - * @summary 获取所有 Chat - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiV1ChatsGet( - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.apiV1ChatsGet(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); - }, - /** - * get string by ID - * @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 - > { - 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); - }, - /** - * get string by ID - * @summary Create Chat - * @param {RagNewInternalSchemaChatCreateRequest} chat Chat - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiV1ChatsPost( - chat: RagNewInternalSchemaChatCreateRequest, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - 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); - }, - }; +export const ChatApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ChatApiAxiosParamCreator(configuration) + return { + /** + * get string by ID + * @summary 获取所有 Chat + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV1ChatsGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1ChatsGet(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); + }, + /** + * get string by ID + * @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> { + 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); + }, + /** + * get string by ID + * @summary Create Chat + * @param {RagNewInternalSchemaChatCreateRequest} chat Chat + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV1ChatsPost(chat: RagNewInternalSchemaChatCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + 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 { - /** - * get string by ID - * @summary 获取所有 Chat - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ChatsGet(options?: any): AxiosPromise { - return localVarFp - .apiV1ChatsGet(options) - .then((request) => request(axios, basePath)); - }, - /** - * get string by ID - * @summary Delete Chat - * @param {number} id Chat ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ChatsIdDelete( - id: number, - options?: any, - ): AxiosPromise { - return localVarFp - .apiV1ChatsIdDelete(id, options) - .then((request) => request(axios, basePath)); - }, - /** - * get string by ID - * @summary Create Chat - * @param {RagNewInternalSchemaChatCreateRequest} chat Chat - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ChatsPost( - chat: RagNewInternalSchemaChatCreateRequest, - options?: any, - ): AxiosPromise { - return localVarFp - .apiV1ChatsPost(chat, options) - .then((request) => request(axios, basePath)); - }, - }; +export const ChatApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ChatApiFp(configuration) + return { + /** + * get string by ID + * @summary 获取所有 Chat + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1ChatsGet(options?: any): AxiosPromise { + return localVarFp.apiV1ChatsGet(options).then((request) => request(axios, basePath)); + }, + /** + * get string by ID + * @summary Delete Chat + * @param {number} id Chat ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1ChatsIdDelete(id: number, options?: any): AxiosPromise { + return localVarFp.apiV1ChatsIdDelete(id, options).then((request) => request(axios, basePath)); + }, + /** + * get string by ID + * @summary Create Chat + * @param {RagNewInternalSchemaChatCreateRequest} chat Chat + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1ChatsPost(chat: RagNewInternalSchemaChatCreateRequest, options?: any): AxiosPromise { + return localVarFp.apiV1ChatsPost(chat, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -1946,405 +1673,262 @@ export const ChatApiFactory = function ( * @extends {BaseAPI} */ export class ChatApi extends BaseAPI { - /** - * get string by ID - * @summary 获取所有 Chat - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChatApi - */ - public apiV1ChatsGet(options?: RawAxiosRequestConfig) { - return ChatApiFp(this.configuration) - .apiV1ChatsGet(options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * get string by ID + * @summary 获取所有 Chat + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChatApi + */ + public apiV1ChatsGet(options?: RawAxiosRequestConfig) { + return ChatApiFp(this.configuration).apiV1ChatsGet(options).then((request) => request(this.axios, this.basePath)); + } - /** - * get string by ID - * @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)); - } + /** + * get string by ID + * @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)); + } - /** - * get string by ID - * @summary Create Chat - * @param {RagNewInternalSchemaChatCreateRequest} chat Chat - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChatApi - */ - public apiV1ChatsPost( - chat: RagNewInternalSchemaChatCreateRequest, - options?: RawAxiosRequestConfig, - ) { - return ChatApiFp(this.configuration) - .apiV1ChatsPost(chat, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * get string by ID + * @summary Create Chat + * @param {RagNewInternalSchemaChatCreateRequest} chat Chat + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChatApi + */ + public apiV1ChatsPost(chat: RagNewInternalSchemaChatCreateRequest, 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 { - /** - * get string by ID - * @summary 查看聊天记录 - * @param {number} id Chat ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ChatsIdMessagesGet: async ( - id: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // 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; - } +export const ChatMessageApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * get string by ID + * @summary 查看聊天记录 + * @param {number} id Chat ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1ChatsIdMessagesGet: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { + // 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; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - // authentication ApiKeyAuth required - await setApiKeyToObject( - localVarHeaderParameter, - "Authorization", - configuration, - ); + // 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 string by ID - * @summary 添加聊天记录 - * @param {number} id Chat ID - * @param {RagNewInternalSchemaChatMessageAddRequest} message Message - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ChatsIdMessagesPost: async ( - id: number, - message: RagNewInternalSchemaChatMessageAddRequest, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // 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; - } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const localVarRequestOptions = { - method: "POST", - ...baseOptions, - ...options, - }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * get string by ID + * @summary 添加聊天记录 + * @param {number} id Chat ID + * @param {RagNewInternalSchemaChatMessageAddRequest} message Message + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1ChatsIdMessagesPost: async (id: number, message: RagNewInternalSchemaChatMessageAddRequest, options: RawAxiosRequestConfig = {}): Promise => { + // 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; + } - // authentication ApiKeyAuth required - await setApiKeyToObject( - localVarHeaderParameter, - "Authorization", - configuration, - ); + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - localVarHeaderParameter["Content-Type"] = "application/json"; + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - 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, - }; - }, - /** - * get string by ID - * @summary 流式传输聊天内容 - * @param {number} id Chat ID - * @param {string} streamId Chat stream id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1StreamStreamIdGet: async ( - id: number, - streamId: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists("apiV1StreamStreamIdGet", "id", id); - // verify required parameter 'streamId' is not null or undefined - assertParamExists("apiV1StreamStreamIdGet", "streamId", streamId); - const localVarPath = `/api/v1/stream/{stream_id}` - .replace(`{${"id"}}`, encodeURIComponent(String(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; - } + + localVarHeaderParameter['Content-Type'] = 'application/json'; - 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}; + localVarRequestOptions.data = serializeDataIfNeeded(message, localVarRequestOptions, configuration) - 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 流式传输聊天内容 + * @param {number} id Chat ID + * @param {string} streamId Chat stream id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1StreamStreamIdGet: async (id: number, streamId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('apiV1StreamStreamIdGet', 'id', id) + // verify required parameter 'streamId' is not null or undefined + assertParamExists('apiV1StreamStreamIdGet', 'streamId', streamId) + const localVarPath = `/api/v1/stream/{stream_id}` + .replace(`{${"id"}}`, encodeURIComponent(String(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; + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + 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, + }; + }, + } }; /** * ChatMessageApi - functional programming interface * @export */ -export const ChatMessageApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - ChatMessageApiAxiosParamCreator(configuration); - return { - /** - * get string by ID - * @summary 查看聊天记录 - * @param {number} id Chat ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiV1ChatsIdMessagesGet( - id: number, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - 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); - }, - /** - * get string by ID - * @summary 添加聊天记录 - * @param {number} id Chat ID - * @param {RagNewInternalSchemaChatMessageAddRequest} message Message - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiV1ChatsIdMessagesPost( - id: number, - message: RagNewInternalSchemaChatMessageAddRequest, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - 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); - }, - /** - * get string by ID - * @summary 流式传输聊天内容 - * @param {number} id Chat ID - * @param {string} streamId Chat stream id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiV1StreamStreamIdGet( - id: number, - streamId: string, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.apiV1StreamStreamIdGet( - id, - streamId, - 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); - }, - }; +export const ChatMessageApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ChatMessageApiAxiosParamCreator(configuration) + return { + /** + * get string by ID + * @summary 查看聊天记录 + * @param {number} id Chat ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV1ChatsIdMessagesGet(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + 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); + }, + /** + * get string by ID + * @summary 添加聊天记录 + * @param {number} id Chat ID + * @param {RagNewInternalSchemaChatMessageAddRequest} message Message + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV1ChatsIdMessagesPost(id: number, message: RagNewInternalSchemaChatMessageAddRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + 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); + }, + /** + * get string by ID + * @summary 流式传输聊天内容 + * @param {number} id Chat ID + * @param {string} streamId Chat stream id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV1StreamStreamIdGet(id: number, streamId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StreamStreamIdGet(id, streamId, 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 { - /** - * get string by ID - * @summary 查看聊天记录 - * @param {number} id Chat ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ChatsIdMessagesGet( - id: number, - options?: any, - ): AxiosPromise { - return localVarFp - .apiV1ChatsIdMessagesGet(id, options) - .then((request) => request(axios, basePath)); - }, - /** - * get string by ID - * @summary 添加聊天记录 - * @param {number} id Chat ID - * @param {RagNewInternalSchemaChatMessageAddRequest} message Message - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ChatsIdMessagesPost( - id: number, - message: RagNewInternalSchemaChatMessageAddRequest, - options?: any, - ): AxiosPromise { - return localVarFp - .apiV1ChatsIdMessagesPost(id, message, options) - .then((request) => request(axios, basePath)); - }, - /** - * get string by ID - * @summary 流式传输聊天内容 - * @param {number} id Chat ID - * @param {string} streamId Chat stream id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1StreamStreamIdGet( - id: number, - streamId: string, - options?: any, - ): AxiosPromise { - return localVarFp - .apiV1StreamStreamIdGet(id, streamId, options) - .then((request) => request(axios, basePath)); - }, - }; +export const ChatMessageApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ChatMessageApiFp(configuration) + return { + /** + * get string by ID + * @summary 查看聊天记录 + * @param {number} id Chat ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1ChatsIdMessagesGet(id: number, options?: any): AxiosPromise { + return localVarFp.apiV1ChatsIdMessagesGet(id, options).then((request) => request(axios, basePath)); + }, + /** + * get string by ID + * @summary 添加聊天记录 + * @param {number} id Chat ID + * @param {RagNewInternalSchemaChatMessageAddRequest} message Message + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1ChatsIdMessagesPost(id: number, message: RagNewInternalSchemaChatMessageAddRequest, options?: any): AxiosPromise { + return localVarFp.apiV1ChatsIdMessagesPost(id, message, options).then((request) => request(axios, basePath)); + }, + /** + * get string by ID + * @summary 流式传输聊天内容 + * @param {number} id Chat ID + * @param {string} streamId Chat stream id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1StreamStreamIdGet(id: number, streamId: string, options?: any): AxiosPromise { + return localVarFp.apiV1StreamStreamIdGet(id, streamId, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -2354,178 +1938,128 @@ export const ChatMessageApiFactory = function ( * @extends {BaseAPI} */ export class ChatMessageApi extends BaseAPI { - /** - * get string by ID - * @summary 查看聊天记录 - * @param {number} id Chat 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)); - } + /** + * get string by ID + * @summary 查看聊天记录 + * @param {number} id Chat 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)); + } - /** - * get string by ID - * @summary 添加聊天记录 - * @param {number} id Chat ID - * @param {RagNewInternalSchemaChatMessageAddRequest} message Message - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChatMessageApi - */ - public apiV1ChatsIdMessagesPost( - id: number, - message: RagNewInternalSchemaChatMessageAddRequest, - options?: RawAxiosRequestConfig, - ) { - return ChatMessageApiFp(this.configuration) - .apiV1ChatsIdMessagesPost(id, message, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * get string by ID + * @summary 添加聊天记录 + * @param {number} id Chat ID + * @param {RagNewInternalSchemaChatMessageAddRequest} message Message + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChatMessageApi + */ + public apiV1ChatsIdMessagesPost(id: number, message: RagNewInternalSchemaChatMessageAddRequest, options?: RawAxiosRequestConfig) { + return ChatMessageApiFp(this.configuration).apiV1ChatsIdMessagesPost(id, message, options).then((request) => request(this.axios, this.basePath)); + } - /** - * get string by ID - * @summary 流式传输聊天内容 - * @param {number} id Chat ID - * @param {string} streamId Chat stream id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChatMessageApi - */ - public apiV1StreamStreamIdGet( - id: number, - streamId: string, - options?: RawAxiosRequestConfig, - ) { - return ChatMessageApiFp(this.configuration) - .apiV1StreamStreamIdGet(id, streamId, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * get string by ID + * @summary 流式传输聊天内容 + * @param {number} id Chat ID + * @param {string} streamId Chat stream id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChatMessageApi + */ + public apiV1StreamStreamIdGet(id: number, streamId: string, options?: RawAxiosRequestConfig) { + return ChatMessageApiFp(this.configuration).apiV1StreamStreamIdGet(id, streamId, options).then((request) => request(this.axios, this.basePath)); + } } + + /** * PingApi - axios parameter creator * @export */ -export const PingApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * get string by ID - * @summary Greet - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1PingGet: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - 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; - } +export const PingApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * get string by ID + * @summary Greet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1PingGet: async (options: RawAxiosRequestConfig = {}): Promise => { + 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; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - // authentication ApiKeyAuth required - await setApiKeyToObject( - localVarHeaderParameter, - "Authorization", - configuration, - ); + // 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, - }; - }, - }; + + 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 { - /** - * get string by ID - * @summary Greet - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiV1PingGet( - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - 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); - }, - }; +export const PingApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = PingApiAxiosParamCreator(configuration) + return { + /** + * get string by ID + * @summary Greet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV1PingGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + 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 { - /** - * get string by ID - * @summary Greet - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1PingGet(options?: any): AxiosPromise { - return localVarFp - .apiV1PingGet(options) - .then((request) => request(axios, basePath)); - }, - }; +export const PingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = PingApiFp(configuration) + return { + /** + * get string by ID + * @summary Greet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1PingGet(options?: any): AxiosPromise { + return localVarFp.apiV1PingGet(options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -2535,438 +2069,283 @@ export const PingApiFactory = function ( * @extends {BaseAPI} */ export class PingApi extends BaseAPI { - /** - * get string by ID - * @summary Greet - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PingApi - */ - public apiV1PingGet(options?: RawAxiosRequestConfig) { - return PingApiFp(this.configuration) - .apiV1PingGet(options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * get string by ID + * @summary Greet + * @param {*} [options] Override http request option. + * @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 => { - 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; - } +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 => { + 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; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - // authentication ApiKeyAuth required - await setApiKeyToObject( - localVarHeaderParameter, - "Authorization", - configuration, - ); + // 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 {string} id Tool ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ToolsIdDelete: async ( - id: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // 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; - } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const localVarRequestOptions = { - method: "DELETE", - ...baseOptions, - ...options, - }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + 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 => { + // 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; + } - // authentication ApiKeyAuth required - await setApiKeyToObject( - localVarHeaderParameter, - "Authorization", - configuration, - ); + const localVarRequestOptions = { method: 'DELETE', ...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, - }; + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get tool - * @summary Get Tool - * @param {string} id Tool ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ToolsIdGet: async ( - id: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // 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; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - // authentication ApiKeyAuth required - await setApiKeyToObject( - localVarHeaderParameter, - "Authorization", - configuration, - ); + 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 => { + // 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; + } - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Create tool - * @summary Create Tool - * @param {RagNewInternalSchemaToolCreateRequest} tool Tool - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ToolsPost: async ( - tool: RagNewInternalSchemaToolCreateRequest, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // 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; - } + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - 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}; - localVarHeaderParameter["Content-Type"] = "application/json"; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create tool + * @summary Create Tool + * @param {RagNewInternalSchemaToolCreateRequest} tool Tool + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1ToolsPost: async (tool: RagNewInternalSchemaToolCreateRequest, options: RawAxiosRequestConfig = {}): Promise => { + // 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; + } - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - localVarRequestOptions.data = serializeDataIfNeeded( - tool, - localVarRequestOptions, - configuration, - ); + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + // 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, + }; + }, + } }; /** * 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 - > { - 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 {string} id Tool ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiV1ToolsIdDelete( - id: string, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - 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 {string} id Tool ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiV1ToolsIdGet( - id: string, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - 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); - }, - /** - * Create tool - * @summary Create Tool - * @param {RagNewInternalSchemaToolCreateRequest} tool Tool - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiV1ToolsPost( - tool: RagNewInternalSchemaToolCreateRequest, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - 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); - }, - }; +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> { + 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> { + 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> { + 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); + }, + /** + * Create tool + * @summary Create Tool + * @param {RagNewInternalSchemaToolCreateRequest} tool Tool + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV1ToolsPost(tool: RagNewInternalSchemaToolCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + 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); + }, + } }; /** * 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?: any): AxiosPromise { - return localVarFp - .apiV1ToolsGet(options) - .then((request) => request(axios, basePath)); - }, - /** - * DeleteTool - * @summary DeleteTool - * @param {string} id Tool ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ToolsIdDelete(id: string, options?: any): AxiosPromise { - return localVarFp - .apiV1ToolsIdDelete(id, options) - .then((request) => request(axios, basePath)); - }, - /** - * Get tool - * @summary Get Tool - * @param {string} id Tool ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ToolsIdGet( - id: string, - options?: any, - ): AxiosPromise { - return localVarFp - .apiV1ToolsIdGet(id, options) - .then((request) => request(axios, basePath)); - }, - /** - * Create tool - * @summary Create Tool - * @param {RagNewInternalSchemaToolCreateRequest} tool Tool - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiV1ToolsPost( - tool: RagNewInternalSchemaToolCreateRequest, - options?: any, - ): AxiosPromise { - return localVarFp - .apiV1ToolsPost(tool, options) - .then((request) => request(axios, basePath)); - }, - }; +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?: any): AxiosPromise { + 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?: any): AxiosPromise { + 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?: any): AxiosPromise { + return localVarFp.apiV1ToolsIdGet(id, options).then((request) => request(axios, basePath)); + }, + /** + * Create tool + * @summary Create Tool + * @param {RagNewInternalSchemaToolCreateRequest} tool Tool + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV1ToolsPost(tool: RagNewInternalSchemaToolCreateRequest, options?: any): AxiosPromise { + return localVarFp.apiV1ToolsPost(tool, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -2976,61 +2355,53 @@ export const ToolApiFactory = function ( * @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)); - } + /** + * 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 {string} id Tool ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ToolApi - */ - public apiV1ToolsIdDelete(id: string, options?: RawAxiosRequestConfig) { - return ToolApiFp(this.configuration) - .apiV1ToolsIdDelete(id, 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 {string} id Tool ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ToolApi - */ - public apiV1ToolsIdGet(id: string, options?: RawAxiosRequestConfig) { - return ToolApiFp(this.configuration) - .apiV1ToolsIdGet(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)); + } - /** - * Create tool - * @summary Create Tool - * @param {RagNewInternalSchemaToolCreateRequest} tool Tool - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ToolApi - */ - public apiV1ToolsPost( - tool: RagNewInternalSchemaToolCreateRequest, - options?: RawAxiosRequestConfig, - ) { - return ToolApiFp(this.configuration) - .apiV1ToolsPost(tool, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Create tool + * @summary Create Tool + * @param {RagNewInternalSchemaToolCreateRequest} tool Tool + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ToolApi + */ + public apiV1ToolsPost(tool: RagNewInternalSchemaToolCreateRequest, options?: RawAxiosRequestConfig) { + return ToolApiFp(this.configuration).apiV1ToolsPost(tool, options).then((request) => request(this.axios, this.basePath)); + } } + + + diff --git a/src/api/base.ts b/src/api/base.ts index bcd43e4..492934a 100644 --- a/src/api/base.ts +++ b/src/api/base.ts @@ -5,18 +5,19 @@ * 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 { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); @@ -25,10 +26,10 @@ export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); * @export */ export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; /** @@ -37,8 +38,8 @@ export const COLLECTION_FORMATS = { * @interface RequestArgs */ export interface RequestArgs { - url: string; - options: RawAxiosRequestConfig; + url: string; + options: RawAxiosRequestConfig; } /** @@ -47,19 +48,15 @@ export interface RequestArgs { * @class BaseAPI */ export class BaseAPI { - protected configuration: Configuration | undefined; + protected configuration: Configuration | undefined; - constructor( - configuration?: Configuration, - protected basePath: string = BASE_PATH, - protected axios: AxiosInstance = globalAxios, - ) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath ?? basePath; + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath ?? basePath; + } } - } -} +}; /** * @@ -68,24 +65,22 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor( - public field: string, - msg?: string, - ) { - super(msg); - this.name = "RequiredError"; - } + constructor(public field: string, msg?: string) { + super(msg); + this.name = "RequiredError" + } } interface ServerMap { - [key: string]: { - url: string; - description: string; - }[]; + [key: string]: { + url: string, + description: string, + }[]; } /** * * @export */ -export const operationServerMap: ServerMap = {}; +export const operationServerMap: ServerMap = { +} diff --git a/src/api/common.ts b/src/api/common.ts index 45fe9cd..c3f1cd7 100644 --- a/src/api/common.ts +++ b/src/api/common.ts @@ -5,139 +5,105 @@ * 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 { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from "axios"; +import type { AxiosInstance, AxiosResponse } from 'axios'; import { RequiredError } from "./base"; /** * * @export */ -export const DUMMY_BASE_URL = "https://example.com"; +export const DUMMY_BASE_URL = 'https://example.com' /** * * @throws {RequiredError} * @export */ -export const assertParamExists = function ( - functionName: string, - paramName: string, - paramValue: unknown, -) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError( - paramName, - `Required parameter ${paramName} was null or undefined when calling ${functionName}.`, - ); - } -}; - -/** - * - * @export - */ -export const setApiKeyToObject = async function ( - object: any, - keyParamName: string, - configuration?: Configuration, -) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = - typeof configuration.apiKey === "function" - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -}; - -/** - * - * @export - */ -export const setBasicAuthToObject = function ( - object: any, - configuration?: Configuration, -) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { - username: configuration.username, - password: configuration.password, - }; - } -}; - -/** - * - * @export - */ -export const setBearerAuthToObject = async function ( - object: any, - configuration?: Configuration, -) { - if (configuration && configuration.accessToken) { - const accessToken = - typeof configuration.accessToken === "function" - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -}; - -/** - * - * @export - */ -export const setOAuthToObject = async function ( - object: any, - name: string, - scopes: string[], - configuration?: Configuration, -) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = - typeof configuration.accessToken === "function" - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -}; - -function setFlattenedQueryParams( - urlSearchParams: URLSearchParams, - parameter: any, - key: string = "", -): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach((item) => - setFlattenedQueryParams(urlSearchParams, item, key), - ); - } else { - Object.keys(parameter).forEach((currentKey) => - setFlattenedQueryParams( - urlSearchParams, - parameter[currentKey], - `${key}${key !== "" ? "." : ""}${currentKey}`, - ), - ); +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); } - } else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } else { - urlSearchParams.set(key, parameter); +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } } - } } /** @@ -145,58 +111,40 @@ function setFlattenedQueryParams( * @export */ export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -}; + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} /** * * @export */ -export const serializeDataIfNeeded = function ( - value: any, - requestOptions: any, - configuration?: Configuration, -) { - const nonString = typeof value !== "string"; - const needsSerialization = - nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : value || ""; -}; +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} /** * * @export */ export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash; -}; + return url.pathname + url.search + url.hash +} /** * * @export */ -export const createRequestFunction = function ( - axiosArgs: RequestArgs, - globalAxios: AxiosInstance, - BASE_PATH: string, - configuration?: Configuration, -) { - return >( - axios: AxiosInstance = globalAxios, - basePath: string = BASE_PATH, - ) => { - const axiosRequestArgs = { - ...axiosArgs.options, - url: - (axios.defaults.baseURL ? "" : (configuration?.basePath ?? basePath)) + - axiosArgs.url, +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); }; - return axios.request(axiosRequestArgs); - }; -}; +} diff --git a/src/api/configuration.ts b/src/api/configuration.ts index 7cb5cdc..85860d9 100644 --- a/src/api/configuration.ts +++ b/src/api/configuration.ts @@ -5,128 +5,106 @@ * 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. */ + export interface ConfigurationParameters { - apiKey?: - | string - | Promise - | ((name: string) => string) - | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string) - | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - serverIndex?: number; - baseOptions?: any; - formDataCtor?: new () => any; + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + serverIndex?: number; + baseOptions?: any; + formDataCtor?: new () => any; } export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: - | string - | Promise - | ((name: string) => string) - | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string) - | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * override server index - * - * @type {number} - * @memberof Configuration - */ - serverIndex?: number; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * override server index + * + * @type {number} + * @memberof Configuration + */ + serverIndex?: number; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.serverIndex = param.serverIndex; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.serverIndex = param.serverIndex; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp( - "^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$", - "i", - ); - return ( - mime !== null && - (jsonMime.test(mime) || - mime.toLowerCase() === "application/json-patch+json") - ); - } + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } } diff --git a/src/api/index.ts b/src/api/index.ts index cbfc652..e1dbc5c 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -5,12 +5,14 @@ * 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. */ + export * from "./api"; export * from "./configuration"; + diff --git a/src/components/AppBar.vue b/src/components/AppBar.vue index ba2e885..4d806d2 100644 --- a/src/components/AppBar.vue +++ b/src/components/AppBar.vue @@ -25,6 +25,13 @@ to="/assistants" /> + + -
- -
- - - -``` - -When your template is rendered, the component's import will automatically be inlined, which renders to this: - -```vue - - - -``` diff --git a/src/pages/assistants/[id]/tools.vue b/src/pages/assistants/[id]/tools.vue new file mode 100644 index 0000000..14a7dad --- /dev/null +++ b/src/pages/assistants/[id]/tools.vue @@ -0,0 +1,112 @@ + + + diff --git a/src/pages/assistants/binds.vue b/src/pages/assistants/binds.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/assistants/index.vue b/src/pages/assistants/index.vue index adc6666..a78c70d 100644 --- a/src/pages/assistants/index.vue +++ b/src/pages/assistants/index.vue @@ -20,12 +20,13 @@

Phone: {{ assistant.phone }}

--> - 对话 --> + + 工具 - 删除 @@ -61,7 +62,6 @@ const assistants: Ref = ref({}); function refresh() { api.Assistant.apiV1AssistantsGet().then((res) => { assistants.value = res.data; - console.log(assistants.value); }); } refresh(); @@ -87,6 +87,10 @@ function deleteAssistantConfirmed() { refresh(); } +function editTool(assistantId: number) { + router.push(`/assistants/${assistantId}/tools`); +} + function to(path: string) { router.push(path); } diff --git a/src/pages/tools/create.vue b/src/pages/tools/create.vue new file mode 100644 index 0000000..13a1bfa --- /dev/null +++ b/src/pages/tools/create.vue @@ -0,0 +1,58 @@ + + + diff --git a/src/pages/tools/index.vue b/src/pages/tools/index.vue new file mode 100644 index 0000000..3ac9c65 --- /dev/null +++ b/src/pages/tools/index.vue @@ -0,0 +1,105 @@ + + + diff --git a/src/typed-router.d.ts b/src/typed-router.d.ts index 49e708d..fc6064e 100644 --- a/src/typed-router.d.ts +++ b/src/typed-router.d.ts @@ -20,9 +20,13 @@ declare module 'vue-router/auto-routes' { export interface RouteNamedMap { '/': RouteRecordInfo<'/', '/', Record, Record>, '/assistants/': RouteRecordInfo<'/assistants/', '/assistants', Record, Record>, + '/assistants/[id]/tools': RouteRecordInfo<'/assistants/[id]/tools', '/assistants/:id/tools', { id: ParamValue }, { id: ParamValue }>, + '/assistants/binds': RouteRecordInfo<'/assistants/binds', '/assistants/binds', 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>, + '/tools/': RouteRecordInfo<'/tools/', '/tools', Record, Record>, + '/tools/create': RouteRecordInfo<'/tools/create', '/tools/create', Record, Record>, } }