Skip to content

Commit f1985fe

Browse files
committed
fix service providers
1 parent e199c38 commit f1985fe

File tree

9 files changed

+5
-6
lines changed

9 files changed

+5
-6
lines changed

bootstrap/src/main/kotlin/com/javaaidev/llmagentbuilder/bootstrap/AgentBootstrap.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ package com.javaaidev.llmagentbuilder.bootstrap
22

33
import com.javaaidev.llmagentbuilder.agent.profile.systemmessage.SystemMessageProfileAdvisor
44
import com.javaaidev.llmagentbuilder.agent.tool.AgentToolInfoAdvisor
5-
import com.javaaidev.llmagentbuilder.core.AgentConfigLoader
6-
import com.javaaidev.llmagentbuilder.launcher.ktor.server.KtorLauncher
7-
import com.javaaidev.llmagentbuilder.plugin.observation.opentelemetry.OpenTelemetryPlugin
85
import com.javaaidev.llmagentbuilder.core.*
96
import com.javaaidev.llmagentbuilder.core.tool.AgentToolFunctionCallbackResolver
107
import com.javaaidev.llmagentbuilder.core.tool.AgentToolsProviderFactory
8+
import com.javaaidev.llmagentbuilder.launcher.ktor.server.KtorLauncher
9+
import com.javaaidev.llmagentbuilder.plugin.observation.opentelemetry.OpenTelemetryPlugin
1110
import io.micrometer.observation.ObservationRegistry
1211
import org.slf4j.LoggerFactory
1312
import org.springframework.ai.chat.client.ChatClient
@@ -32,7 +31,7 @@ object AgentBootstrap {
3231
bootstrap(AgentConfigLoader.load(configFileStream))
3332
}
3433

35-
fun bootstrap(agentConfig: com.javaaidev.llmagentbuilder.core.AgentConfig) {
34+
fun bootstrap(agentConfig: AgentConfig) {
3635
val advisors = listOf(
3736
this::profileAdvisor,
3837
this::inMemoryMessageHistoryAdvisor
@@ -127,13 +126,13 @@ object AgentBootstrap {
127126
KtorLauncher.launch(chatAgent, agentConfig.launch)
128127
}
129128

130-
private fun profileAdvisor(agentConfig: com.javaaidev.llmagentbuilder.core.AgentConfig): Advisor? {
129+
private fun profileAdvisor(agentConfig: AgentConfig): Advisor? {
131130
return agentConfig.profile?.system?.run {
132131
SystemMessageProfileAdvisor(this)
133132
}
134133
}
135134

136-
private fun inMemoryMessageHistoryAdvisor(agentConfig: com.javaaidev.llmagentbuilder.core.AgentConfig): Advisor? {
135+
private fun inMemoryMessageHistoryAdvisor(agentConfig: AgentConfig): Advisor? {
137136
return if (agentConfig.memory?.inMemory?.enabled == true) {
138137
logger.info("Enable in-memory message history")
139138
MessageChatMemoryAdvisor(InMemoryChatMemory())

0 commit comments

Comments
 (0)