Commit 0a290374 authored by ali's avatar ali

add: console.time

parent ca96fb29
...@@ -338,8 +338,10 @@ async function llmLoop(question: string) { ...@@ -338,8 +338,10 @@ async function llmLoop(question: string) {
photoRole!.off('asyncAnswer', onAsyncAnswer) photoRole!.off('asyncAnswer', onAsyncAnswer)
photoRole!.on('asyncAnswer', onAsyncAnswer) photoRole!.on('asyncAnswer', onAsyncAnswer)
let index = 0 let index = 0
let timeKey = '0 -------------------->'
while (true) { while (true) {
console.time(timeKey)
// @ts-ignore // @ts-ignore
if (microphoneState.value === 'input' || microphoneState.value === 'waitInput') { if (microphoneState.value === 'input' || microphoneState.value === 'waitInput') {
break break
...@@ -369,6 +371,9 @@ async function llmLoop(question: string) { ...@@ -369,6 +371,9 @@ async function llmLoop(question: string) {
if (newList.length === 0 && isEnd) return if (newList.length === 0 && isEnd) return
if (newList.length === 0) continue if (newList.length === 0) continue
console.timeEnd(timeKey)
timeKey = `${(parseInt(timeKey) + 1)} -------------------->`;
for (let i = 0; i < newList.length; i++) { for (let i = 0; i < newList.length; i++) {
// @ts-ignore // @ts-ignore
if (microphoneState.value === 'input' || microphoneState.value === 'waitInput') { 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