Ver Fonte

add await

Shun Miyazawa há 11 meses atrás
pai
commit
8ac485dfe4

+ 1 - 1
apps/app/src/features/openai/client/components/AiAssistant/AiAssistantSidebar/AiAssistantSidebar.tsx

@@ -130,7 +130,7 @@ const AiAssistantSidebarSubstance: React.FC<AiAssistantSidebarSubstanceProps> =
       return response;
       return response;
     }
     }
     if (aiAssistantData?._id != null) {
     if (aiAssistantData?._id != null) {
-      const response = postMessageForKnowledgeAssistant(aiAssistantData._id, currentThreadId, input);
+      const response = await postMessageForKnowledgeAssistant(aiAssistantData._id, currentThreadId, input);
       return response;
       return response;
     }
     }
   }, [aiAssistantData?._id, isEditorAssistant, postMessageForEditorAssistant, postMessageForKnowledgeAssistant]);
   }, [aiAssistantData?._id, isEditorAssistant, postMessageForEditorAssistant, postMessageForKnowledgeAssistant]);