Skip to content

Commit

Permalink
Merge pull request #616 from lixinghua123/3.8.5-lxh
Browse files Browse the repository at this point in the history
fix: LLMMultiWheel tool audio playback error
  • Loading branch information
lihqi authored Dec 5, 2024
2 parents a0a3774 + a25dc25 commit 6b89745
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions packages/lb-components/src/components/LLMMultiWheelView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,21 +133,22 @@ const LLMMultiWheelView: React.FC<IProps> = (props) => {
}
const currentData = imgList[imgIndex] ?? {};
const dialogList = currentData?.questionList?.textList ?? [];

setDialogList(dialogList);
if (dialogList?.length) {
setSelectedID(dialogList[0].id);
}
}, [imgIndex]);

useEffect(() => {
if (!imgList[imgIndex]) {
return;
}
const currentData = imgList[imgIndex] ?? {};
const qaData = currentData?.questionList;

const llmFile = currentData?.llmFile?.textList;

const textList = qaData?.textList;

const newDialogList = textList?.map((item: any, questionIndex: number) => {
return {
...item,
Expand Down Expand Up @@ -181,7 +182,15 @@ const LLMMultiWheelView: React.FC<IProps> = (props) => {
};
});
setDialogList(newDialogList);
}, [newAnswerListMap, questionIsImg, questionIsAudio, answerIsImg]);
}, [
newAnswerListMap,
questionIsImg,
questionIsAudio,
answerIsImg,
answerIsAudio,
imgList,
imgIndex,
]);

useEffect(() => {
if (stepList && step) {
Expand Down

0 comments on commit 6b89745

Please sign in to comment.