mirror of
https://github.com/idootop/mi-gpt.git
synced 2025-04-07 19:21:30 +00:00
34 lines
643 B
TypeScript
34 lines
643 B
TypeScript
import { MiGPT } from "../src";
|
|
|
|
const botProfile = `
|
|
性别:女
|
|
性格:乖巧可爱
|
|
爱好:喜欢搞怪,爱吃醋。
|
|
`;
|
|
|
|
const masterProfile = `
|
|
性别:男
|
|
性格:善良正直
|
|
其他:总是舍己为人,是傻妞的主人。
|
|
`;
|
|
|
|
export async function testMiGPT() {
|
|
const client = MiGPT.create({
|
|
speaker: {
|
|
userId: process.env.MI_USER!,
|
|
password: process.env.MI_PASS!,
|
|
did: process.env.MI_DID,
|
|
streamResponse: true,
|
|
},
|
|
bot: {
|
|
name: "傻妞",
|
|
profile: botProfile,
|
|
},
|
|
master: {
|
|
name: "陆小千",
|
|
profile: masterProfile,
|
|
},
|
|
});
|
|
await client.start();
|
|
}
|