Package io.jmix.dynmodelai.history
Class AgentHistoryService
java.lang.Object
io.jmix.dynmodelai.history.AgentHistoryService
- All Implemented Interfaces:
AgentHistory
@Component("dmagent_AgentHistory")
public class AgentHistoryService
extends Object
implements AgentHistory
Saves and reads immutable event snapshots independently of runtime caches and UI sessions.
-
Constructor Summary
ConstructorsConstructorDescriptionAgentHistoryService(AgentHistoryRepository historyRepository, AgentHistoryJson historyJson, ConversationRepository conversationRepository, ConversationContextRepository contextRepository, ModelUsageRepository modelUsageRepository, org.springframework.transaction.PlatformTransactionManager transactionManager) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<AgentHistoryRecord> getRunHistory(UUID conversationId, UUID runId, org.springframework.data.domain.Pageable pageable) org.springframework.data.domain.Page<AgentHistoryRecord> getRunSnapshots(UUID conversationId, UUID runId, org.springframework.data.domain.Pageable pageable) modelNamesByConversation(List<UUID> conversationIds) Distinct recorded model names in first-observation order; missing history is not inferred from configuration.voidrecord(AgentHistoryRecord event) The terminal event and its chat message commit together, before live delivery.
-
Constructor Details
-
AgentHistoryService
public AgentHistoryService(AgentHistoryRepository historyRepository, AgentHistoryJson historyJson, ConversationRepository conversationRepository, ConversationContextRepository contextRepository, ModelUsageRepository modelUsageRepository, @Qualifier("transactionManager") org.springframework.transaction.PlatformTransactionManager transactionManager)
-
-
Method Details
-
record
The terminal event and its chat message commit together, before live delivery.- Specified by:
recordin interfaceAgentHistory
-
getRunHistory
public org.springframework.data.domain.Page<AgentHistoryRecord> getRunHistory(UUID conversationId, UUID runId, org.springframework.data.domain.Pageable pageable) -
getRunSnapshots
public org.springframework.data.domain.Page<AgentHistoryRecord> getRunSnapshots(UUID conversationId, UUID runId, org.springframework.data.domain.Pageable pageable) -
modelNamesByConversation
Distinct recorded model names in first-observation order; missing history is not inferred from configuration.
-