-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1010 from jmartisk/issue-1009
Don't include tools from removed beans in the ToolsMetadata
- Loading branch information
Showing
2 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
.../main/java/io/quarkiverse/langchain4j/deployment/ToolsMetadataBeforeRemovalBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package io.quarkiverse.langchain4j.deployment; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import io.quarkiverse.langchain4j.runtime.tool.ToolMethodCreateInfo; | ||
import io.quarkus.builder.item.SimpleBuildItem; | ||
|
||
/** | ||
* Holds metadata about tools discovered at build time, but tools belonging | ||
* to beans removed by ArC have not been filtered out yet | ||
* (ToolsMetadataBuildItem is the build item that already has them filtered | ||
* out). | ||
*/ | ||
public final class ToolsMetadataBeforeRemovalBuildItem extends SimpleBuildItem { | ||
|
||
Map<String, List<ToolMethodCreateInfo>> metadata; | ||
|
||
public ToolsMetadataBeforeRemovalBuildItem(Map<String, List<ToolMethodCreateInfo>> metadata) { | ||
this.metadata = metadata; | ||
} | ||
|
||
public Map<String, List<ToolMethodCreateInfo>> getMetadata() { | ||
return metadata; | ||
} | ||
|
||
} |