Skip to content

Commit

Permalink
move objects / history before get_workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
givenscj committed Jan 15, 2025
1 parent 815def9 commit 3042382
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -536,8 +538,6 @@ 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)
Expand Down

0 comments on commit 3042382

Please sign in to comment.