diff --git a/src/python/PythonSDK/foundationallm/langchain/agents/langchain_knowledge_management_agent.py b/src/python/PythonSDK/foundationallm/langchain/agents/langchain_knowledge_management_agent.py index a5dd1bd7c..5810c7eb4 100644 --- a/src/python/PythonSDK/foundationallm/langchain/agents/langchain_knowledge_management_agent.py +++ b/src/python/PythonSDK/foundationallm/langchain/agents/langchain_knowledge_management_agent.py @@ -536,6 +536,8 @@ async def invoke_async(self, request: KnowledgeManagementCompletionRequest) -> C self.user_identity, self.config) + request.objects['message_history'] = request.message_history + # Get message history if agent.conversation_history_settings.enabled: messages = self._build_conversation_history_message_list(request.message_history, agent.conversation_history_settings.max_history) @@ -553,8 +555,6 @@ async def invoke_async(self, request: KnowledgeManagementCompletionRequest) -> C return response # End External Agent workflow implementation - request.objects['message_history'] = request.message_history - # Start LangChain Expression Language (LCEL) implementation # Get the vector document retriever, if it exists.