diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/domain/LangChain4jModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/domain/LangChain4jModuleFactory.java index d4eb851560d..09dbe3d6efa 100644 --- a/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/domain/LangChain4jModuleFactory.java +++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/domain/LangChain4jModuleFactory.java @@ -36,7 +36,7 @@ public JHipsterModule buildModule(JHipsterModuleProperties properties) { .addDependency(GROUP_ID, OPEN_AI_ARTIFACT_ID, VERSION_SLUG) .and() .springMainProperties() - .set(LANGCHAIN4J_PROPERTY_API_KEY, propertyValue("${OPENAI_API_KEY}")) + .set(LANGCHAIN4J_PROPERTY_API_KEY, propertyValue("demo")) .comment(LANGCHAIN4J_PROPERTY_API_KEY, comment(API_KEY_DEMO_COMMENT)) .set(propertyKey("langchain4j.open-ai.chat-model.model-name"), propertyValue("gpt-4o-mini")) .set(propertyKey("langchain4j.open-ai.chat-model.log-requests"), propertyValue("true")) diff --git a/src/test/java/tech/jhipster/lite/generator/server/springboot/langchain4j/domain/LangChain4jModuleFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/server/springboot/langchain4j/domain/LangChain4jModuleFactoryTest.java index 77d40161737..b4d83f5ce08 100644 --- a/src/test/java/tech/jhipster/lite/generator/server/springboot/langchain4j/domain/LangChain4jModuleFactoryTest.java +++ b/src/test/java/tech/jhipster/lite/generator/server/springboot/langchain4j/domain/LangChain4jModuleFactoryTest.java @@ -58,7 +58,7 @@ void shouldCreateModule() { open-ai: chat-model: # You can temporarily use 'demo' key, which is provided for free for demonstration purposes - api-key: ${OPENAI_API_KEY} + api-key: demo log-requests: 'true' log-responses: 'true' model-name: gpt-4o-mini