Skip to content

Commit f1b1b25

Browse files
authored
Merge pull request #171 from jmartisk/tools-devui
Minor Dev UI fixes for tools
2 parents caf0783 + e83da97 commit f1b1b25

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/deployment/src/main/java/io/quarkiverse/langchain4j/deployment/devui/Langchain4jDevUIProcessor.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ CardPageBuildItem cardPage(List<DeclarativeAiServiceBuildItem> aiServices,
2626
List<EmbeddingStoreBuildItem> embeddingStoreBuildItem) {
2727
CardPageBuildItem card = new CardPageBuildItem();
2828
addAiServicesPage(card, aiServices);
29-
addToolsPage(card, toolsMetadataBuildItem);
29+
if (toolsMetadataBuildItem != null) {
30+
addToolsPage(card, toolsMetadataBuildItem);
31+
}
3032
// for now, add the embedding store page only if there is a single embedding model and a single embedding store
3133
// if we allow more in the future, we need a way to specify which ones to use for the page
3234
if (embeddingModelBuildItem.size() == 1 && embeddingStoreBuildItem.size() == 1) {
@@ -61,7 +63,7 @@ private void addToolsPage(CardPageBuildItem card, ToolsMetadataBuildItem metadat
6163
for (Map.Entry<String, List<ToolMethodCreateInfo>> toolClassEntry : metadata.entrySet()) {
6264
for (ToolMethodCreateInfo toolMethodCreateInfo : toolClassEntry.getValue()) {
6365
infos.add(new ToolMethodInfo(toolClassEntry.getKey(),
64-
toolMethodCreateInfo.getMethodName(),
66+
toolMethodCreateInfo.getToolSpecification().name(),
6567
toolMethodCreateInfo.getToolSpecification().description()));
6668
}
6769
}

0 commit comments

Comments
 (0)