Skip to content

Commit 96c064a

Browse files
committed
Style(format): apply Spring Java Format to chat client advisors
Signed-off-by: KoreaNirsa <[email protected]>
1 parent 387e239 commit 96c064a

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

spring-ai-client-chat/src/main/java/org/springframework/ai/chat/client/advisor/MessageChatMemoryAdvisor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ public ChatClientRequest before(ChatClientRequest chatClientRequest, AdvisorChai
8383
// 1. Retrieve the chat memory for the current conversation.
8484
List<Message> memoryMessages = this.chatMemory.get(conversationId);
8585

86-
// 2. Retrieve prompt & instructions and pre-compute expected size (memory + instructions) to reduce reallocations.
86+
// 2. Retrieve prompt & instructions and pre-compute expected size (memory +
87+
// instructions) to reduce reallocations.
8788
Prompt prompt = chatClientRequest.prompt();
8889
List<Message> instructions = prompt.getInstructions();
8990
int expectedSize = memoryMessages.size() + instructions.size();

spring-ai-client-chat/src/main/java/org/springframework/ai/chat/client/advisor/PromptChatMemoryAdvisor.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,10 @@ else if (chatClientResponse.chatResponse() != null) {
161161
if (logger.isDebugEnabled()) {
162162
logger.debug(
163163
"[PromptChatMemoryAdvisor.after] Added ASSISTANT messages to memory for conversationId={}: {}",
164-
cid,
165-
assistantMessages);
164+
cid, assistantMessages);
166165
List<Message> memoryMessages = this.chatMemory.get(cid);
167166
logger.debug("[PromptChatMemoryAdvisor.after] Memory after ASSISTANT add for conversationId={}: {}",
168-
cid,
169-
memoryMessages);
167+
cid, memoryMessages);
170168
}
171169
}
172170
return chatClientResponse;

spring-ai-client-chat/src/main/java/org/springframework/ai/chat/client/advisor/api/BaseChatMemoryAdvisor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ default String getConversationId(Map<String, Object> context, String defaultConv
3939
Assert.state(!context.containsKey(null), "context cannot contain null keys");
4040
Assert.hasText(defaultConversationId, "defaultConversationId cannot be null or empty");
4141

42-
Object value = context.get(ChatMemory.CONVERSATION_ID);
42+
Object value = context.get(ChatMemory.CONVERSATION_ID);
4343
return (value != null) ? value.toString() : defaultConversationId;
4444
}
4545

0 commit comments

Comments
 (0)