浏览代码

fix: front end error when same tool is called twice at once (#5068)

Charles Zhou 10 月之前
父节点
当前提交
eaca892c4e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      web/app/components/app/chat/thought/index.tsx

+ 1 - 1
web/app/components/app/chat/thought/index.tsx

@@ -47,7 +47,7 @@ const Thought: FC<IThoughtProps> = ({
   const toolThoughtList = toolNames.map((toolName, index) => {
   const toolThoughtList = toolNames.map((toolName, index) => {
     return {
     return {
       name: toolName,
       name: toolName,
-      label: thought.tool_labels?.[toolName][language] ?? toolName,
+      label: thought.tool_labels?.toolName?.language ?? toolName,
       input: getValue(thought.tool_input, isValueArray, index),
       input: getValue(thought.tool_input, isValueArray, index),
       output: getValue(thought.observation, isValueArray, index),
       output: getValue(thought.observation, isValueArray, index),
       isFinished,
       isFinished,