Skip to content

Commit

Permalink
Merge pull request #171 from jmartisk/tools-devui
Browse files Browse the repository at this point in the history
Minor Dev UI fixes for tools
  • Loading branch information
geoand authored Dec 20, 2023
2 parents caf0783 + e83da97 commit f1b1b25
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ CardPageBuildItem cardPage(List<DeclarativeAiServiceBuildItem> aiServices,
List<EmbeddingStoreBuildItem> embeddingStoreBuildItem) {
CardPageBuildItem card = new CardPageBuildItem();
addAiServicesPage(card, aiServices);
addToolsPage(card, toolsMetadataBuildItem);
if (toolsMetadataBuildItem != null) {
addToolsPage(card, toolsMetadataBuildItem);
}
// for now, add the embedding store page only if there is a single embedding model and a single embedding store
// if we allow more in the future, we need a way to specify which ones to use for the page
if (embeddingModelBuildItem.size() == 1 && embeddingStoreBuildItem.size() == 1) {
Expand Down Expand Up @@ -61,7 +63,7 @@ private void addToolsPage(CardPageBuildItem card, ToolsMetadataBuildItem metadat
for (Map.Entry<String, List<ToolMethodCreateInfo>> toolClassEntry : metadata.entrySet()) {
for (ToolMethodCreateInfo toolMethodCreateInfo : toolClassEntry.getValue()) {
infos.add(new ToolMethodInfo(toolClassEntry.getKey(),
toolMethodCreateInfo.getMethodName(),
toolMethodCreateInfo.getToolSpecification().name(),
toolMethodCreateInfo.getToolSpecification().description()));
}
}
Expand Down

0 comments on commit f1b1b25

Please sign in to comment.