diff --git a/components/CodeBlock.tsx b/components/CodeBlock.tsx index 39a86d0..64642dd 100644 --- a/components/CodeBlock.tsx +++ b/components/CodeBlock.tsx @@ -37,7 +37,7 @@ export const CodeBlock = (props: Props) => { - + {value} diff --git a/components/ConnectionSidebar.tsx b/components/ConnectionSidebar.tsx index fb466d1..898ca86 100644 --- a/components/ConnectionSidebar.tsx +++ b/components/ConnectionSidebar.tsx @@ -193,7 +193,7 @@ const ConnectionSidebar = () => { ) : ( )} - {chat.title || "SQL Chat"} + {chat.title || "SQL Chat"} { diff --git a/store/assistant.ts b/store/assistant.ts index cd3043c..babfa1c 100644 --- a/store/assistant.ts +++ b/store/assistant.ts @@ -18,9 +18,12 @@ export const getAssistantById = (id: Id) => { // getPromptOfAssistant define the special prompt for each assistant. export const getPromptGeneratorOfAssistant = (assistant: User) => { + const basicPrompt = `Please follow the instructions to answer the questions. +1. Set the language to the markdown code block for each code block. For example, \`SELECT * FROM table\` is SQL. +`; if (assistant.id === "sql-assistant") { return (schema: string) => - `This is my database schema"${schema}". You will see the tables and columns in the database. And please answer the following questions about the database.`; + `This is my database schema"${schema}". You will see the tables and columns in the database. And please answer the following questions about the database.\n${basicPrompt}`; } - return () => ""; + return () => `\n${basicPrompt}`; };