Explorar o código

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

Charles Zhou hai 11 meses
pai
achega
eaca892c4e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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) => {
     return {
       name: toolName,
-      label: thought.tool_labels?.[toolName][language] ?? toolName,
+      label: thought.tool_labels?.toolName?.language ?? toolName,
       input: getValue(thought.tool_input, isValueArray, index),
       output: getValue(thought.observation, isValueArray, index),
       isFinished,