mirror of
https://github.com/idootop/mi-gpt.git
synced 2025-04-07 00:28:24 +00:00
fix: 修复使用提示音链接时,小爱回答完毕后,仍然重复播放文字提示语的问题
This commit is contained in:
parent
0ba3b07c5d
commit
6041088fbc
|
@ -225,7 +225,12 @@ export class AISpeaker extends Speaker {
|
|||
}
|
||||
},
|
||||
async (msg, data) => {
|
||||
if (data.answer && data.res == null && this.streamResponse) {
|
||||
if (
|
||||
data.answer &&
|
||||
data.res == null &&
|
||||
!this.audioBeep &&
|
||||
this.streamResponse
|
||||
) {
|
||||
// 回复完毕
|
||||
await this.response({
|
||||
text: pickOne(this.onAIReplied)!,
|
||||
|
|
|
@ -2,7 +2,13 @@ import { randomUUID } from "crypto";
|
|||
import { openai } from "../src/services/openai";
|
||||
|
||||
export async function testOpenAI() {
|
||||
await testStreamChat();
|
||||
await testChat();
|
||||
// await testStreamChat();
|
||||
}
|
||||
|
||||
async function testChat() {
|
||||
const res = await openai.chat({ user: "地球为什么是圆的?" });
|
||||
console.log("\nFinal result:\n", res?.content);
|
||||
}
|
||||
|
||||
async function testStreamChat() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user