Skip to content

Commit d9801a9

Browse files
authored
Merge pull request #1137 from rsvoboda/feat/1133
Store local models under `~/.langchain4j/models`
2 parents 2e8615a + fb7331a commit d9801a9

File tree

11 files changed

+11
-10
lines changed

11 files changed

+11
-10
lines changed

docs/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
** xref:huggingface.adoc[HuggingFace]
1616
** xref:ollama.adoc[Ollama]
1717
** xref:jlama.adoc[Jlama]
18+
** xref:llama3.adoc[Llama3.java]
1819
** xref:podman.adoc[Podman AI Lab]
1920
** xref:anthropic.adoc[Anthropic (Claude)]
2021
** xref:mistral.adoc[Mistral AI]

docs/modules/ROOT/pages/includes/quarkus-langchain4j-jlama.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Environment variable: `+++QUARKUS_LANGCHAIN4J_JLAMA_MODELS_PATH+++`
108108
endif::add-copy-button-to-env-var[]
109109
--
110110
|path
111-
|`${user.home}/.jlama/models`
111+
|`${user.home}/.langchain4j/models`
112112

113113
a| [[quarkus-langchain4j-jlama_quarkus-langchain4j-jlama-chat-model-temperature]] [.property-path]##link:#quarkus-langchain4j-jlama_quarkus-langchain4j-jlama-chat-model-temperature[`quarkus.langchain4j.jlama.chat-model.temperature`]##
114114

docs/modules/ROOT/pages/includes/quarkus-langchain4j-jlama_quarkus.langchain4j.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Environment variable: `+++QUARKUS_LANGCHAIN4J_JLAMA_MODELS_PATH+++`
108108
endif::add-copy-button-to-env-var[]
109109
--
110110
|path
111-
|`${user.home}/.jlama/models`
111+
|`${user.home}/.langchain4j/models`
112112

113113
a| [[quarkus-langchain4j-jlama_quarkus-langchain4j-jlama-chat-model-temperature]] [.property-path]##link:#quarkus-langchain4j-jlama_quarkus-langchain4j-jlama-chat-model-temperature[`quarkus.langchain4j.jlama.chat-model.temperature`]##
114114

docs/modules/ROOT/pages/includes/quarkus-langchain4j-llama3-java.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Environment variable: `+++QUARKUS_LANGCHAIN4J_LLAMA3_MODELS_PATH+++`
108108
endif::add-copy-button-to-env-var[]
109109
--
110110
|path
111-
|`${user.home}/.llama3java/models`
111+
|`${user.home}/.langchain4j/models`
112112

113113
a| [[quarkus-langchain4j-llama3-java_quarkus-langchain4j-llama3-chat-model-temperature]] [.property-path]##link:#quarkus-langchain4j-llama3-java_quarkus-langchain4j-llama3-chat-model-temperature[`quarkus.langchain4j.llama3.chat-model.temperature`]##
114114

docs/modules/ROOT/pages/includes/quarkus-langchain4j-llama3-java_quarkus.langchain4j.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Environment variable: `+++QUARKUS_LANGCHAIN4J_LLAMA3_MODELS_PATH+++`
108108
endif::add-copy-button-to-env-var[]
109109
--
110110
|path
111-
|`${user.home}/.llama3java/models`
111+
|`${user.home}/.langchain4j/models`
112112

113113
a| [[quarkus-langchain4j-llama3-java_quarkus-langchain4j-llama3-chat-model-temperature]] [.property-path]##link:#quarkus-langchain4j-llama3-java_quarkus-langchain4j-llama3-chat-model-temperature[`quarkus.langchain4j.llama3.chat-model.temperature`]##
114114

docs/modules/ROOT/pages/jlama.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Quarkus LangChain4j automatically handles the pulling of the models configured b
3535
3636
WARNING: When running Quarkus in dev mode C2 compilation is not enabled and this can make Jlama excessively slow. This limitation will be fixed with Quarkus 3.17 when `<forceC2>true</forceC2>` is set.
3737
38-
WARNING: Models are huge, so make sure you have enough disk space.
38+
WARNING: Models are huge, so make sure you have enough disk space. Model location can be controlled using `quarkus.langchain4j.jlama.models-path` property.
3939
4040
NOTE: Due to model's large size, pulling them can take time
4141

docs/modules/ROOT/pages/llama3.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Quarkus LangChain4j automatically handles the pulling of the models configured b
3535
3636
WARNING: When running Quarkus in dev mode C2 compilation is not enabled and this can make Llama3.java excessively slow. This limitation will be fixed with Quarkus 3.17 when `<forceC2>true</forceC2>` is set.
3737
38-
WARNING: Models are huge, so make sure you have enough disk space.
38+
WARNING: Models are huge, so make sure you have enough disk space. Models location can be controlled using `quarkus.langchain4j.llama3.models-path` property.
3939
4040
NOTE: Due to model's large size, pulling them can take time
4141

model-providers/jlama/runtime/src/main/java/io/quarkiverse/langchain4j/jlama/JlamaModelRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
1818
public class JlamaModelRegistry {
1919

20-
private static final String DEFAULT_MODEL_CACHE_PATH = System.getProperty("user.home", "") + File.separator + ".jlama"
20+
private static final String DEFAULT_MODEL_CACHE_PATH = System.getProperty("user.home", "") + File.separator + ".langchain4j"
2121
+ File.separator + "models";
2222
private final Path modelCachePath;
2323

model-providers/jlama/runtime/src/main/java/io/quarkiverse/langchain4j/jlama/runtime/config/LangChain4jJlamaFixedRuntimeConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public interface LangChain4jJlamaFixedRuntimeConfig {
3838
* Location on the file-system which serves as a cache for the models
3939
*
4040
*/
41-
@ConfigDocDefault("${user.home}/.jlama/models")
41+
@ConfigDocDefault("${user.home}/.langchain4j/models")
4242
Optional<Path> modelsPath();
4343

4444
@ConfigGroup

model-providers/llama3-java/runtime/src/main/java/io/quarkiverse/langchain4j/llama3/Llama3ModelRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class Llama3ModelRegistry {
3838

3939
private static final Logger log = Logger.getLogger(Llama3ModelRegistry.class);
4040

41-
private static final String DEFAULT_MODEL_CACHE_PATH = System.getProperty("user.home", "") + File.separator + ".llama3java"
41+
private static final String DEFAULT_MODEL_CACHE_PATH = System.getProperty("user.home", "") + File.separator + ".langchain4j"
4242
+ File.separator + "models";
4343
public static String FINISHED_MARKER = ".finished";
4444

0 commit comments

Comments
 (0)