Skip to content

Commit 7b58447

Browse files
improved flow execution with conversation history
1 parent 67a0b04 commit 7b58447

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/base/ai/Actions/Orchestrator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function runFlow(string $userPrompt, array &$history = []) : array
106106
$history[] = $this->llm->formatUserMessage($userPrompt);
107107

108108
// save flow messages to history, we can skip technical messages and previous history
109-
$history = array_merge($history, array_slice($this->filterTechMessages($messages), count($initialMessages)));
109+
$history = array_merge($history, $this->filterTechMessages(array_slice($messages, count($initialMessages))));
110110

111111
// add assistant final message to history
112112
$history[] = $this->llm->formatAssistantMessage($normalized['assistantText'] ?? '');

0 commit comments

Comments
 (0)