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 0a249615a6..c947837eb4 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 @@ -527,6 +527,8 @@ async def invoke_async(self, request: KnowledgeManagementCompletionRequest) -> C for tool in agent.tools: tools.append(tool_factory.get_tool(tool, request.objects, self.user_identity, self.config)) + request.objects['message_history'] = request.message_history + # create the workflow workflow_factory = WorkflowFactory(self.plugin_manager) workflow = workflow_factory.get_workflow( diff --git a/src/python/PythonSDK/foundationallm/models/messages/message_history_item.py b/src/python/PythonSDK/foundationallm/models/messages/message_history_item.py index 5ff1acfa92..b12cba75f5 100644 --- a/src/python/PythonSDK/foundationallm/models/messages/message_history_item.py +++ b/src/python/PythonSDK/foundationallm/models/messages/message_history_item.py @@ -1,9 +1,12 @@ -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing import List, Optional + +from foundationallm.models.orchestration import ContentArtifact class MessageHistoryItem(BaseModel): """ Represents an historic message sender and text item. - + Parameters ---------- sender : str @@ -13,3 +16,4 @@ class MessageHistoryItem(BaseModel): """ sender: str text: str + content_artifacts : Optional[List[ContentArtifact]] = []