mi-gpt/tests/db/index.ts

24 lines
645 B
TypeScript
Raw Normal View History

2024-01-30 15:40:31 +00:00
import { assert } from "console";
import { ConversationManager } from "../../src/services/bot/conversation";
import { println } from "../../src/utils/base";
export async function testDB() {
const manager = new ConversationManager({
bot: {
name: "小爱同学",
profile: "我是小爱同学,机器人",
},
master: {
name: "王黎",
profile: "我是王黎,人类",
},
room: {
name: "客厅",
description: "王黎的客厅,小爱同学放在角落里",
},
});
const { room } = await manager.get();
2024-01-30 15:40:31 +00:00
assert(room, "❌ load config failed");
println("✅ hello world");
}