Ver código fonte

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

Charles Zhou 10 meses atrás
pai
commit
eaca892c4e
1 arquivos alterados com 1 adições e 1 exclusões
  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,