Skip to content

Commit eb3b796

Browse files
zhfengppalaga
authored andcommitted
Explicitly use locale with en_US in String.format
1 parent 68a8cb3 commit eb3b796

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

data-extract-langchain4j/src/main/java/org/acme/extraction/CustomPojoExtractionService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.acme.extraction;
1818

1919
import java.time.LocalDate;
20+
import java.util.Locale;
2021

2122
import dev.langchain4j.service.UserMessage;
2223
import io.quarkiverse.langchain4j.RegisterAiService;
@@ -45,7 +46,7 @@ static class CustomPojo {
4546
+ "}\n";
4647

4748
public String toString() {
48-
return String.format(FORMAT, this.customerSatisfied, this.customerName, this.customerBirthday,
49+
return String.format(Locale.US, FORMAT, this.customerSatisfied, this.customerName, this.customerBirthday,
4950
this.customerBirthday, this.customerBirthday, this.summary);
5051
}
5152
}

data-extract-langchain4j/src/main/resources/application.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ quarkus.langchain4j.ollama.chat-model.temperature = 0
3434

3535
# Configure Quarkus LangChain4j to keep a single message in memory, forgetting about previous data extractions
3636
quarkus.langchain4j.chat-memory.memory-window.max-messages = 1
37+
38+
quarkus.native.user-country=US
39+
quarkus.native.user-language=en

0 commit comments

Comments
 (0)