feat(server): reinstate JournalCompactionService with real inference
This commit is contained in:
@@ -58,6 +58,7 @@ import com.correx.core.toolintent.rules.NetworkHostRule
|
||||
import com.correx.core.toolintent.rules.PathContainmentRule
|
||||
import com.correx.apps.server.freestyle.FreestyleDriver
|
||||
import com.correx.apps.server.inference.summarizeWithInference
|
||||
import com.correx.core.kernel.orchestration.JournalCompactionService
|
||||
import com.correx.apps.server.personalization.ProfileAdaptationService
|
||||
import com.correx.core.artifacts.kind.DefaultArtifactKindRegistry
|
||||
import com.correx.core.events.types.ArtifactId
|
||||
@@ -247,6 +248,11 @@ fun main() {
|
||||
sandboxRoot = sandboxRoot,
|
||||
defaultSystemPromptPath = toolsConfig.defaultSystemPromptPath,
|
||||
)
|
||||
val journalCompactionService = JournalCompactionService(
|
||||
artifactStore = artifactStore,
|
||||
summarize = { prompt -> summarizeWithInference(prompt, SessionId("system"), inferenceRouter) },
|
||||
tokenThreshold = defaultOrchestrationConfig.journalCompactionTokenThreshold,
|
||||
)
|
||||
val orchestrator = DefaultSessionOrchestrator(
|
||||
repositories = repositories,
|
||||
engines = engines,
|
||||
@@ -254,6 +260,7 @@ fun main() {
|
||||
artifactStore = artifactStore,
|
||||
tokenizer = firstProvider.tokenizer,
|
||||
decisionJournalRepository = decisionJournalRepository,
|
||||
compactionService = journalCompactionService,
|
||||
)
|
||||
val routerConfig = correxConfig.router
|
||||
val embedder = InfrastructureModule.createEmbedderFromConfig(routerConfig.embedder)
|
||||
|
||||
Reference in New Issue
Block a user