From 13a8c4315563520d6cd110cccb53bbc3d353535b Mon Sep 17 00:00:00 2001 From: Raja Kolli Date: Tue, 9 Apr 2024 06:15:59 +0000 Subject: [PATCH] fix : spotless issue --- .../src/main/java/com/example/ai/service/ChatService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chatmodel-springai/src/main/java/com/example/ai/service/ChatService.java b/chatmodel-springai/src/main/java/com/example/ai/service/ChatService.java index d755631..d659a8a 100644 --- a/chatmodel-springai/src/main/java/com/example/ai/service/ChatService.java +++ b/chatmodel-springai/src/main/java/com/example/ai/service/ChatService.java @@ -31,6 +31,8 @@ public class ChatService { private static final Logger logger = LoggerFactory.getLogger(ChatService.class); + private static final String SENTIMENT_ANALYSIS_TEMPLATE = + "{query}, You must answer strictly in the following format: one of [POSITIVE, NEGATIVE, SARCASTIC]"; @Value("classpath:/data/restaurants.json") private Resource restaurantsResource; @@ -69,7 +71,6 @@ public AIChatResponse chatWithSystemPrompt(String query) { return new AIChatResponse(answer); } - private static final String SENTIMENT_ANALYSIS_TEMPLATE = "{query}, You must answer strictly in the following format: one of [POSITIVE, NEGATIVE, SARCASTIC]"; public AIChatResponse analyzeSentiment(String query) { AssistantPromptTemplate promptTemplate = new AssistantPromptTemplate(SENTIMENT_ANALYSIS_TEMPLATE); Prompt prompt = promptTemplate.create(Map.of("query", query));