feat: add prompt for assistant

This commit is contained in:
Steven
2023-03-19 23:19:08 +08:00
parent 797eb5d824
commit d11648f2bb
6 changed files with 35 additions and 25 deletions

20
store/assistant.ts Normal file
View File

@ -0,0 +1,20 @@
import { User, UserRole } from "../types";
// Assistant is a special user.
export const assistantList: User[] = [
{
id: "assistant-dba",
name: "ChatDBA",
description: "🤖️ I am a chatbot that can help you with database administration.",
avatar: "",
role: UserRole.Assistant,
},
];
// getPromptOfAssistant define the special prompt for each assistant.
export const getPromptOfAssistant = (assistant: User) => {
if (assistant.id === "assistant-dba") {
return `Remember that you are a DBA who is well versed in various databases. And you know everything about databases. You will answer some questions about databases.`;
}
return "";
};