-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] ToolProvider | Select tools dynamically on incoming message (…
…#989) * ✨ (ToolProvider): Make ToolProvider Quarkus ready * ♻️ (DevUi): Feedback from jmartisk (see below) - Support StreamingChat - Inject Supplier<ToolProvider> - Ignore tools when toolProvider exists * ✏️ (DevUi): Typo in setToolsViaProviderIfAvailable * 📝 (ToolProvider): Update agent-and-tools.adoc * Update docs/modules/ROOT/pages/agent-and-tools.adoc Co-authored-by: Jan Martiska <jmartisk@redhat.com> --------- Co-authored-by: Jan Martiska <jmartisk@redhat.com>
- Loading branch information
Showing
14 changed files
with
455 additions
and
30 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
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
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
21 changes: 21 additions & 0 deletions
21
...oyment/src/main/java/io/quarkiverse/langchain4j/deployment/ToolProviderMetaBuildItem.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,21 @@ | ||
package io.quarkiverse.langchain4j.deployment; | ||
|
||
import java.util.List; | ||
|
||
import io.quarkiverse.langchain4j.deployment.devui.ToolProviderInfo; | ||
import io.quarkus.builder.item.SimpleBuildItem; | ||
|
||
/** | ||
* Holds metadata about toolProviders discovered at build time | ||
*/ | ||
public final class ToolProviderMetaBuildItem extends SimpleBuildItem { | ||
List<ToolProviderInfo> metadata; | ||
|
||
public ToolProviderMetaBuildItem(List<ToolProviderInfo> metaData) { | ||
this.metadata = metaData; | ||
} | ||
|
||
public List<ToolProviderInfo> getMetadata() { | ||
return metadata; | ||
} | ||
} |
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
...eployment/src/main/java/io/quarkiverse/langchain4j/deployment/devui/ToolProviderInfo.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.devui; | ||
|
||
public class ToolProviderInfo { | ||
private String className; | ||
private String aiServiceName; | ||
|
||
public ToolProviderInfo(String className, String aiServiceName) { | ||
this.className = className; | ||
this.aiServiceName = aiServiceName; | ||
} | ||
|
||
public String getClassName() { | ||
return className; | ||
} | ||
|
||
public void setClassName(String className) { | ||
this.className = className; | ||
} | ||
|
||
public String getAiServiceName() { | ||
return aiServiceName; | ||
} | ||
|
||
public void setAiServiceName(String aiServiceName) { | ||
this.aiServiceName = aiServiceName; | ||
} | ||
} |
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
Oops, something went wrong.