From 911c801f04aacc0e25fb8f73fede9b8aa0a9c9f3 Mon Sep 17 00:00:00 2001 From: steven Date: Tue, 18 Apr 2023 11:20:54 +0800 Subject: [PATCH] chore: add bot template --- assistants/template/README.md | 3 +++ assistants/template/index.ts | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 assistants/template/README.md create mode 100644 assistants/template/index.ts diff --git a/assistants/template/README.md b/assistants/template/README.md new file mode 100644 index 0000000..555169a --- /dev/null +++ b/assistants/template/README.md @@ -0,0 +1,3 @@ +# Bot template + +You can contribute your own bot with this template. diff --git a/assistants/template/index.ts b/assistants/template/index.ts new file mode 100644 index 0000000..3029f60 --- /dev/null +++ b/assistants/template/index.ts @@ -0,0 +1,13 @@ +// It's a template for creating new bots. +export default { + id: "the-id-of-your-bot", + name: "The name of your bot", + description: "The description of your bot", + avatar: "The avatar link of your bot", + // The function to get the prompt of the bot. + getPrompt: (input: string): string => { + // You can do some preprocessing here. + const formatedInput = input.trim().toLowerCase(); + return `The prompt of your bot. The question is ${formatedInput}`; + }, +};