Skip to content

Commit

Permalink
Add api key comment
Browse files Browse the repository at this point in the history
  • Loading branch information
anunnakian committed Nov 6, 2024
1 parent c031693 commit 8b7ee24
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

public class LangChain4JModuleFactory {

private static final String API_KEY_DEMO_COMMENT =
"# You can temporarily use 'demo' key, which is provided " + "for free for demonstration purposes";

private static final JHipsterSource SOURCE = from("server/springboot/langchain4j");
private static final GroupId GROUP_ID = groupId("dev.langchain4j");
private static final ArtifactId ARTIFACT_ID = artifactId("langchain4j-spring-boot-starter");
Expand All @@ -32,6 +35,7 @@ public JHipsterModule buildModule(JHipsterModuleProperties properties) {
.and()
.springMainProperties()
.set(propertyKey("langchain4j.open-ai.chat-model.api-key"), propertyValue("${OPENAI_API_KEY}"))
.comment(propertyKey("langchain4j.open-ai.chat-model.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"))
.set(propertyKey("langchain4j.open-ai.chat-model.log-responses"), propertyValue("true"))
Expand Down

0 comments on commit 8b7ee24

Please sign in to comment.