BAEL-7142, fix minor comment

This commit is contained in:
kateryna.hrytsaenko 2023-12-26 21:35:19 +02:00
parent bd1ded4d6e
commit bf45a052f4
6 changed files with 7 additions and 8 deletions

View File

@ -60,5 +60,4 @@
</plugin>
</plugins>
</build>
</project>

View File

@ -1,3 +1,3 @@
package com.baeldung.spring.ai.dto;
public record PoetryDto (String title, String poetry, String genre, String theme){}
public record PoetryDto (String title, String poetry, String genre, String theme) {}

View File

@ -32,12 +32,12 @@ public class PoetryServiceImpl implements PoetryService {
public PoetryDto getPoetryByGenreAndTheme(String genre, String theme) {
BeanOutputParser<PoetryDto> poetryDtoBeanOutputParser = new BeanOutputParser<>(PoetryDto.class);
String promtString = """
String promptString = """
Write me {genre} poetry about {theme}
{format}
""";
PromptTemplate promptTemplate = new PromptTemplate(promtString);
PromptTemplate promptTemplate = new PromptTemplate(promptString);
promptTemplate.add("genre", genre);
promptTemplate.add("theme", theme);
promptTemplate.add("format", poetryDtoBeanOutputParser.getFormat());

View File

@ -1,3 +1,3 @@
spring:
ai:
openai.api-key: ${OPEN_AI_KEY}
openai.api-key: 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