This is an automated email from the ASF dual-hosted git repository.

ppalaga pushed a commit to branch camel-quarkus-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus-examples.git


The following commit(s) were added to refs/heads/camel-quarkus-main by this 
push:
     new eb3b796  Explicitly use locale with en_US in String.format
eb3b796 is described below

commit eb3b796f5b9c635cbf113f5cf2605e928a701eab
Author: Zheng Feng <zh.f...@gmail.com>
AuthorDate: Fri Nov 29 17:53:31 2024 +0800

    Explicitly use locale with en_US in String.format
---
 .../src/main/java/org/acme/extraction/CustomPojoExtractionService.java | 3 ++-
 data-extract-langchain4j/src/main/resources/application.properties     | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/data-extract-langchain4j/src/main/java/org/acme/extraction/CustomPojoExtractionService.java
 
b/data-extract-langchain4j/src/main/java/org/acme/extraction/CustomPojoExtractionService.java
index 7f2ecb4..8a6923e 100644
--- 
a/data-extract-langchain4j/src/main/java/org/acme/extraction/CustomPojoExtractionService.java
+++ 
b/data-extract-langchain4j/src/main/java/org/acme/extraction/CustomPojoExtractionService.java
@@ -17,6 +17,7 @@
 package org.acme.extraction;
 
 import java.time.LocalDate;
+import java.util.Locale;
 
 import dev.langchain4j.service.UserMessage;
 import io.quarkiverse.langchain4j.RegisterAiService;
@@ -45,7 +46,7 @@ public interface CustomPojoExtractionService {
                 + "}\n";
 
         public String toString() {
-            return String.format(FORMAT, this.customerSatisfied, 
this.customerName, this.customerBirthday,
+            return String.format(Locale.US, FORMAT, this.customerSatisfied, 
this.customerName, this.customerBirthday,
                     this.customerBirthday, this.customerBirthday, 
this.summary);
         }
     }
diff --git a/data-extract-langchain4j/src/main/resources/application.properties 
b/data-extract-langchain4j/src/main/resources/application.properties
index da692fb..4fc0b74 100644
--- a/data-extract-langchain4j/src/main/resources/application.properties
+++ b/data-extract-langchain4j/src/main/resources/application.properties
@@ -34,3 +34,6 @@ quarkus.langchain4j.ollama.chat-model.temperature = 0
 
 # Configure Quarkus LangChain4j to keep a single message in memory, forgetting 
about previous data extractions
 quarkus.langchain4j.chat-memory.memory-window.max-messages = 1
+
+quarkus.native.user-country=US
+quarkus.native.user-language=en

Reply via email to