-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to disable all models at build time
- Loading branch information
Showing
20 changed files
with
378 additions
and
18 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
16 changes: 16 additions & 0 deletions
16
...src/main/java/io/quarkiverse/langchain4j/huggingface/deployment/ChatModelBuildConfig.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,16 @@ | ||
package io.quarkiverse.langchain4j.huggingface.deployment; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigDocDefault; | ||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
|
||
@ConfigGroup | ||
public interface ChatModelBuildConfig { | ||
|
||
/** | ||
* Whether the model should be enabled | ||
*/ | ||
@ConfigDocDefault("true") | ||
Optional<Boolean> enabled(); | ||
} |
16 changes: 16 additions & 0 deletions
16
...ain/java/io/quarkiverse/langchain4j/huggingface/deployment/EmbeddingModelBuildConfig.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,16 @@ | ||
package io.quarkiverse.langchain4j.huggingface.deployment; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigDocDefault; | ||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
|
||
@ConfigGroup | ||
public interface EmbeddingModelBuildConfig { | ||
|
||
/** | ||
* Whether the model should be enabled | ||
*/ | ||
@ConfigDocDefault("true") | ||
Optional<Boolean> enabled(); | ||
} |
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
26 changes: 26 additions & 0 deletions
26
.../io/quarkiverse/langchain4j/huggingface/deployment/Langchain4jHuggingFaceBuildConfig.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,26 @@ | ||
package io.quarkiverse.langchain4j.huggingface.deployment; | ||
|
||
import static io.quarkus.runtime.annotations.ConfigPhase.BUILD_TIME; | ||
|
||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
|
||
@ConfigRoot(phase = BUILD_TIME) | ||
@ConfigMapping(prefix = "quarkus.langchain4j.huggingface") | ||
public interface Langchain4jHuggingFaceBuildConfig { | ||
|
||
/** | ||
* Chat model related settings | ||
*/ | ||
ChatModelBuildConfig chatModel(); | ||
|
||
/** | ||
* Embedding model related settings | ||
*/ | ||
EmbeddingModelBuildConfig embeddingModel(); | ||
|
||
/** | ||
* Moderation model related settings | ||
*/ | ||
ModerationModelBuildConfig moderationModel(); | ||
} |
16 changes: 16 additions & 0 deletions
16
...in/java/io/quarkiverse/langchain4j/huggingface/deployment/ModerationModelBuildConfig.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,16 @@ | ||
package io.quarkiverse.langchain4j.huggingface.deployment; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigDocDefault; | ||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
|
||
@ConfigGroup | ||
public interface ModerationModelBuildConfig { | ||
|
||
/** | ||
* Whether the model should be enabled | ||
*/ | ||
@ConfigDocDefault("true") | ||
Optional<Boolean> enabled(); | ||
} |
16 changes: 16 additions & 0 deletions
16
...ment/src/main/java/io/quarkiverse/langchain4j/ollama/deployment/ChatModelBuildConfig.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,16 @@ | ||
package io.quarkiverse.langchain4j.ollama.deployment; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigDocDefault; | ||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
|
||
@ConfigGroup | ||
public interface ChatModelBuildConfig { | ||
|
||
/** | ||
* Whether the model should be enabled | ||
*/ | ||
@ConfigDocDefault("true") | ||
Optional<Boolean> enabled(); | ||
} |
16 changes: 16 additions & 0 deletions
16
...java/io/quarkiverse/langchain4j/ollama/deployment/Langchain4jOllamaOpenAiBuildConfig.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,16 @@ | ||
package io.quarkiverse.langchain4j.ollama.deployment; | ||
|
||
import static io.quarkus.runtime.annotations.ConfigPhase.BUILD_TIME; | ||
|
||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
|
||
@ConfigRoot(phase = BUILD_TIME) | ||
@ConfigMapping(prefix = "quarkus.langchain4j.ollama") | ||
public interface Langchain4jOllamaOpenAiBuildConfig { | ||
|
||
/** | ||
* Chat model related settings | ||
*/ | ||
ChatModelBuildConfig chatModel(); | ||
} |
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
16 changes: 16 additions & 0 deletions
16
...rc/main/java/io/quarkiverse/langchain4j/azure/openai/deployment/ChatModelBuildConfig.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,16 @@ | ||
package io.quarkiverse.langchain4j.azure.openai.deployment; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigDocDefault; | ||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
|
||
@ConfigGroup | ||
public interface ChatModelBuildConfig { | ||
|
||
/** | ||
* Whether the model should be enabled | ||
*/ | ||
@ConfigDocDefault("true") | ||
Optional<Boolean> enabled(); | ||
} |
16 changes: 16 additions & 0 deletions
16
...in/java/io/quarkiverse/langchain4j/azure/openai/deployment/EmbeddingModelBuildConfig.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,16 @@ | ||
package io.quarkiverse.langchain4j.azure.openai.deployment; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigDocDefault; | ||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
|
||
@ConfigGroup | ||
public interface EmbeddingModelBuildConfig { | ||
|
||
/** | ||
* Whether the model should be enabled | ||
*/ | ||
@ConfigDocDefault("true") | ||
Optional<Boolean> enabled(); | ||
} |
26 changes: 26 additions & 0 deletions
26
...io/quarkiverse/langchain4j/azure/openai/deployment/Langchain4jAzureOpenAiBuildConfig.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,26 @@ | ||
package io.quarkiverse.langchain4j.azure.openai.deployment; | ||
|
||
import static io.quarkus.runtime.annotations.ConfigPhase.BUILD_TIME; | ||
|
||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
|
||
@ConfigRoot(phase = BUILD_TIME) | ||
@ConfigMapping(prefix = "quarkus.langchain4j.azure-openai") | ||
public interface Langchain4jAzureOpenAiBuildConfig { | ||
|
||
/** | ||
* Chat model related settings | ||
*/ | ||
ChatModelBuildConfig chatModel(); | ||
|
||
/** | ||
* Embedding model related settings | ||
*/ | ||
EmbeddingModelBuildConfig embeddingModel(); | ||
|
||
/** | ||
* Moderation model related settings | ||
*/ | ||
ModerationModelBuildConfig moderationModel(); | ||
} |
16 changes: 16 additions & 0 deletions
16
...n/java/io/quarkiverse/langchain4j/azure/openai/deployment/ModerationModelBuildConfig.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,16 @@ | ||
package io.quarkiverse.langchain4j.azure.openai.deployment; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigDocDefault; | ||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
|
||
@ConfigGroup | ||
public interface ModerationModelBuildConfig { | ||
|
||
/** | ||
* Whether the model should be enabled | ||
*/ | ||
@ConfigDocDefault("true") | ||
Optional<Boolean> enabled(); | ||
} |
16 changes: 16 additions & 0 deletions
16
...ment/src/main/java/io/quarkiverse/langchain4j/openai/deployment/ChatModelBuildConfig.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,16 @@ | ||
package io.quarkiverse.langchain4j.openai.deployment; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigDocDefault; | ||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
|
||
@ConfigGroup | ||
public interface ChatModelBuildConfig { | ||
|
||
/** | ||
* Whether the model should be enabled | ||
*/ | ||
@ConfigDocDefault("true") | ||
Optional<Boolean> enabled(); | ||
} |
16 changes: 16 additions & 0 deletions
16
...src/main/java/io/quarkiverse/langchain4j/openai/deployment/EmbeddingModelBuildConfig.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,16 @@ | ||
package io.quarkiverse.langchain4j.openai.deployment; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigDocDefault; | ||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
|
||
@ConfigGroup | ||
public interface EmbeddingModelBuildConfig { | ||
|
||
/** | ||
* Whether the model should be enabled | ||
*/ | ||
@ConfigDocDefault("true") | ||
Optional<Boolean> enabled(); | ||
} |
26 changes: 26 additions & 0 deletions
26
.../main/java/io/quarkiverse/langchain4j/openai/deployment/Langchain4jOpenAiBuildConfig.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,26 @@ | ||
package io.quarkiverse.langchain4j.openai.deployment; | ||
|
||
import static io.quarkus.runtime.annotations.ConfigPhase.BUILD_TIME; | ||
|
||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
|
||
@ConfigRoot(phase = BUILD_TIME) | ||
@ConfigMapping(prefix = "quarkus.langchain4j.openai") | ||
public interface Langchain4jOpenAiBuildConfig { | ||
|
||
/** | ||
* Chat model related settings | ||
*/ | ||
ChatModelBuildConfig chatModel(); | ||
|
||
/** | ||
* Embedding model related settings | ||
*/ | ||
EmbeddingModelBuildConfig embeddingModel(); | ||
|
||
/** | ||
* Moderation model related settings | ||
*/ | ||
ModerationModelBuildConfig moderationModel(); | ||
} |
16 changes: 16 additions & 0 deletions
16
...rc/main/java/io/quarkiverse/langchain4j/openai/deployment/ModerationModelBuildConfig.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,16 @@ | ||
package io.quarkiverse.langchain4j.openai.deployment; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigDocDefault; | ||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
|
||
@ConfigGroup | ||
public interface ModerationModelBuildConfig { | ||
|
||
/** | ||
* Whether the model should be enabled | ||
*/ | ||
@ConfigDocDefault("true") | ||
Optional<Boolean> enabled(); | ||
} |
Oops, something went wrong.