forked from quarkiverse/quarkus-langchain4j
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'quarkiverse:main' into main
- Loading branch information
Showing
51 changed files
with
1,533 additions
and
114 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
...c/main/java/io/quarkiverse/langchain4j/deployment/devui/AdditionalDevUiCardBuildItem.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,41 @@ | ||
package io.quarkiverse.langchain4j.deployment.devui; | ||
|
||
import java.util.Collections; | ||
import java.util.Map; | ||
|
||
import io.quarkus.builder.item.MultiBuildItem; | ||
|
||
public final class AdditionalDevUiCardBuildItem extends MultiBuildItem { | ||
|
||
private final String title; | ||
private final String icon; | ||
private final String componentLink; | ||
private final Map<String, Object> buildTimeData; | ||
|
||
public AdditionalDevUiCardBuildItem(String title, String icon, String componentLink) { | ||
this(title, icon, componentLink, Collections.emptyMap()); | ||
} | ||
|
||
public AdditionalDevUiCardBuildItem(String title, String icon, String componentLink, Map<String, Object> buildTimeData) { | ||
this.title = title; | ||
this.icon = icon; | ||
this.componentLink = componentLink; | ||
this.buildTimeData = buildTimeData; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public String getIcon() { | ||
return icon; | ||
} | ||
|
||
public String getComponentLink() { | ||
return componentLink; | ||
} | ||
|
||
public Map<String, Object> getBuildTimeData() { | ||
return buildTimeData; | ||
} | ||
} |
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
18 changes: 18 additions & 0 deletions
18
...nt/src/main/java/io/quarkiverse/langchain4j/deployment/devui/OpenWebUIDevUIProcessor.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,18 @@ | ||
package io.quarkiverse.langchain4j.deployment.devui; | ||
|
||
import io.quarkiverse.langchain4j.runtime.devui.OpenWebUIJsonRPCService; | ||
import io.quarkus.deployment.IsDevelopment; | ||
import io.quarkus.deployment.annotations.BuildProducer; | ||
import io.quarkus.deployment.annotations.BuildStep; | ||
import io.quarkus.deployment.builditem.CuratedApplicationShutdownBuildItem; | ||
import io.quarkus.devui.spi.JsonRPCProvidersBuildItem; | ||
|
||
public final class OpenWebUIDevUIProcessor { | ||
|
||
@BuildStep(onlyIf = IsDevelopment.class) | ||
void registerOpenWebUiCard(BuildProducer<JsonRPCProvidersBuildItem> jsonRPCProviders, | ||
CuratedApplicationShutdownBuildItem closeBuildItem) { | ||
jsonRPCProviders.produce(new JsonRPCProvidersBuildItem(OpenWebUIJsonRPCService.class)); | ||
closeBuildItem.addCloseTask(OpenWebUIJsonRPCService.CLOSE_TASK, true); | ||
} | ||
} |
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.