Add conversation history for jobs

This commit is contained in:
mudler
2024-04-08 16:10:26 +02:00
parent 185fb89d39
commit 533caeee96
3 changed files with 30 additions and 18 deletions

View File

@@ -167,6 +167,9 @@ func (a *Agent) consumeJob(job *Job, role string) {
ctx, cancel := context.WithCancel(context.Background())
a.actionContext = action.NewContext(ctx, cancel)
a.selfEvaluationInProgress = selfEvaluation
if len(job.conversationHistory) != 0 {
a.currentConversation = job.conversationHistory
}
a.Unlock()
if selfEvaluation {