Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcheng1982 committed Oct 5, 2024
1 parent 7f238ce commit 99085ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ object AgentBootstrap {
agentToolsProvider,
)
val observationRegistry = ObservationRegistry.create()
OpenTelemetryPlugin().install(agentConfig, observationRegistry)
if (agentConfig.observation?.enabled == true) {
OpenTelemetryPlugin().install(agentConfig, observationRegistry)
}
val llmConfigs = agentConfig.llm
val chatModel = ServiceLoader.load(ChatModelProvider::class.java)
.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import io.github.llmagentbuilder.core.observation.DefaultAgentToolExecutionObser
import io.micrometer.observation.ObservationRegistry
import org.slf4j.LoggerFactory
import org.springframework.ai.model.function.FunctionCallback
import org.springframework.ai.model.function.FunctionCallbackContext
import org.springframework.ai.model.function.FunctionCallbackWrapper
import org.springframework.core.GenericTypeResolver
import java.util.*
Expand All @@ -35,7 +36,7 @@ class AgentToolWrappersProvider(
InstrumentedFunctionCallbackWrapper(
FunctionCallbackWrapper.builder(tool)
.withName(tool.name())
.withSchemaType(FunctionCallbackWrapper.Builder.SchemaType.JSON_SCHEMA)
.withSchemaType(FunctionCallbackContext.SchemaType.JSON_SCHEMA)
.withDescription(tool.description())
.withInputType(
types?.get(0)
Expand Down

0 comments on commit 99085ce

Please sign in to comment.