docs: 更新 callAIKeywords 参数说明
This commit is contained in:
@@ -8,6 +8,10 @@ async function main() {
|
|||||||
baseURL: "https://api.openai.com/v1",
|
baseURL: "https://api.openai.com/v1",
|
||||||
apiKey: "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
apiKey: "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
||||||
},
|
},
|
||||||
|
// 默认只会处理以下关键词开头的消息(你也可以自定义),比如:
|
||||||
|
// - 请问地球为什么是圆的?
|
||||||
|
// - 你知道世界上跑的最快的动物是什么吗?
|
||||||
|
callAIKeywords: ["请", "你"],
|
||||||
async onMessage(_engine, { text }) {
|
async onMessage(_engine, { text }) {
|
||||||
if (text.startsWith("你好")) {
|
if (text.startsWith("你好")) {
|
||||||
await sleep(1000);
|
await sleep(1000);
|
||||||
|
|||||||
Reference in New Issue
Block a user