From 95156b96c209311d9a6ef87fe86c4c56ff2d392b Mon Sep 17 00:00:00 2001 From: ivamp Date: Tue, 13 Aug 2024 09:33:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=20id=20=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/swagger.yaml | 27 +++++++++++++++++---------- src/api/api.ts | 42 +++++++++++++++++++++--------------------- 2 files changed, 38 insertions(+), 31 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index 779787b..398944d 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -8,7 +8,8 @@ definitions: disable_default_prompt: type: boolean id: - type: integer + example: "0" + type: string name: type: string prompt: @@ -25,7 +26,8 @@ definitions: created_at: type: string id: - type: integer + example: "0" + type: string token: type: string updated_at: @@ -38,7 +40,8 @@ definitions: created_at: type: string id: - type: integer + example: "0" + type: string tool_id: type: integer updated_at: @@ -53,7 +56,8 @@ definitions: created_at: type: string id: - type: integer + example: "0" + type: string tool: $ref: '#/definitions/rag-new_internal_entity.Tool' tool_id: @@ -72,7 +76,8 @@ definitions: guest_id: type: string id: - type: integer + example: "0" + type: string name: type: string owner: @@ -86,15 +91,16 @@ definitions: properties: assistant_id: type: integer + completion_tokens: + type: integer content: type: string created_at: type: string id: - type: integer - input_tokens: - type: integer - output_tokens: + example: "0" + type: string + prompt_tokens: type: integer role: type: string @@ -116,7 +122,8 @@ definitions: discovery_url: type: string id: - type: integer + example: "0" + type: string name: type: string updated_at: diff --git a/src/api/api.ts b/src/api/api.ts index c7c8d10..fe10358 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -452,10 +452,10 @@ export interface RagNewInternalEntityAssistant { 'disable_default_prompt'?: boolean; /** * - * @type {number} + * @type {string} * @memberof RagNewInternalEntityAssistant */ - 'id'?: number; + 'id'?: string; /** * * @type {string} @@ -501,10 +501,10 @@ export interface RagNewInternalEntityAssistantShare { 'created_at'?: string; /** * - * @type {number} + * @type {string} * @memberof RagNewInternalEntityAssistantShare */ - 'id'?: number; + 'id'?: string; /** * * @type {string} @@ -538,10 +538,10 @@ export interface RagNewInternalEntityAssistantTool { 'created_at'?: string; /** * - * @type {number} + * @type {string} * @memberof RagNewInternalEntityAssistantTool */ - 'id'?: number; + 'id'?: string; /** * * @type {number} @@ -581,10 +581,10 @@ export interface RagNewInternalEntityAssistantToolType { 'created_at'?: string; /** * - * @type {number} + * @type {string} * @memberof RagNewInternalEntityAssistantToolType */ - 'id'?: number; + 'id'?: string; /** * * @type {RagNewInternalEntityTool} @@ -636,10 +636,10 @@ export interface RagNewInternalEntityChat { 'guest_id'?: string; /** * - * @type {number} + * @type {string} * @memberof RagNewInternalEntityChat */ - 'id'?: number; + 'id'?: string; /** * * @type {string} @@ -677,6 +677,12 @@ export interface RagNewInternalEntityChatMessage { * @memberof RagNewInternalEntityChatMessage */ 'assistant_id'?: number; + /** + * + * @type {number} + * @memberof RagNewInternalEntityChatMessage + */ + 'completion_tokens'?: number; /** * * @type {string} @@ -691,22 +697,16 @@ export interface RagNewInternalEntityChatMessage { 'created_at'?: string; /** * - * @type {number} + * @type {string} * @memberof RagNewInternalEntityChatMessage */ - 'id'?: number; + 'id'?: string; /** * * @type {number} * @memberof RagNewInternalEntityChatMessage */ - 'input_tokens'?: number; - /** - * - * @type {number} - * @memberof RagNewInternalEntityChatMessage - */ - 'output_tokens'?: number; + 'prompt_tokens'?: number; /** * * @type {string} @@ -764,10 +764,10 @@ export interface RagNewInternalEntityTool { 'discovery_url'?: string; /** * - * @type {number} + * @type {string} * @memberof RagNewInternalEntityTool */ - 'id'?: number; + 'id'?: string; /** * * @type {string}