From dfc84ebdf8f990f09bc2590fbb89c8bb734dfe0d Mon Sep 17 00:00:00 2001 From: Sma1lboy <541898146chen@gmail.com> Date: Thu, 30 Jan 2025 12:27:19 -0600 Subject: [PATCH] refactor(backend): update prompt messages to include tags --- backend/src/build-system/handlers/database/schemas/prompt.ts | 2 -- backend/src/build-system/handlers/database/schemas/schemas.ts | 2 +- .../src/build-system/handlers/frontend-code-generate/index.ts | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/src/build-system/handlers/database/schemas/prompt.ts b/backend/src/build-system/handlers/database/schemas/prompt.ts index c6a617cb..524b5006 100644 --- a/backend/src/build-system/handlers/database/schemas/prompt.ts +++ b/backend/src/build-system/handlers/database/schemas/prompt.ts @@ -131,9 +131,7 @@ Your reply must start with "" and end with "".`; ): string => { return `You are a Database Expert specializing in ${databaseType}. Your task is to analyze and fix any issues in the following database schema: - ${schemaContent} - As an expert database engineer, you should: 1. Analyze the schema for any syntax errors, logical inconsistencies, or missing elements diff --git a/backend/src/build-system/handlers/database/schemas/schemas.ts b/backend/src/build-system/handlers/database/schemas/schemas.ts index ba01a3bf..fda7b701 100644 --- a/backend/src/build-system/handlers/database/schemas/schemas.ts +++ b/backend/src/build-system/handlers/database/schemas/schemas.ts @@ -116,7 +116,7 @@ export class DBSchemaHandler implements BuildHandler { { role: 'user', content: - 'help me fix my schema code if there is any failed validation', + 'help me fix my schema code if there is any failed validation, generate full validated version schemas for me, with xml tag', }, ], }, diff --git a/backend/src/build-system/handlers/frontend-code-generate/index.ts b/backend/src/build-system/handlers/frontend-code-generate/index.ts index 5fa6caf9..419db5a1 100644 --- a/backend/src/build-system/handlers/frontend-code-generate/index.ts +++ b/backend/src/build-system/handlers/frontend-code-generate/index.ts @@ -193,8 +193,8 @@ export class FrontendCodeHandler implements BuildHandler { content: `Dependencies: ${dependenciesText}\n - Now you can provide the code. - `, + Now you can provide the code, don't forget the xml tags. +, `, }, ] as MessageInterface[];