Thread safe recording of llm invocations in concurrent mode
Using embabel in mode embabel.agent.platform.process-type=CONCURRENT, LLM calls might run in parallel. The LlmInvocation is recorded in the AgentProcess using ToolLoopOperations.recordUsage. The backing List is a ArrayList and therefore not thread safe. _history also uses a ArrayList
linked to issue #1604 @stefanks-px please consider using sub-issues for grouping issues @azanux -FYI
would be good to have design for all connected issues and address them from a common perspective.
@igordayen , I think #1602 can be handled independently - while @stefanks-px clarifies his thoughts on other Issues and linked to #1604
@igordayen , I think #1602 can be handled independently - agreed. suggesting to consider: private val _llmInvocations = CopyOnWriteArrayList
() thanks.