Commit 0a290374 authored by ali's avatar ali

add: console.time

parent ca96fb29
......@@ -338,8 +338,10 @@ async function llmLoop(question: string) {
photoRole!.off('asyncAnswer', onAsyncAnswer)
photoRole!.on('asyncAnswer', onAsyncAnswer)
let index = 0
let timeKey = '0 -------------------->'
while (true) {
console.time(timeKey)
// @ts-ignore
if (microphoneState.value === 'input' || microphoneState.value === 'waitInput') {
break
......@@ -369,6 +371,9 @@ async function llmLoop(question: string) {
if (newList.length === 0 && isEnd) return
if (newList.length === 0) continue
console.timeEnd(timeKey)
timeKey = `${(parseInt(timeKey) + 1)} -------------------->`;
for (let i = 0; i < newList.length; i++) {
// @ts-ignore
if (microphoneState.value === 'input' || microphoneState.value === 'waitInput') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment