Skip to content

Commit 9d9c10e

Browse files
committed
apply java formatting
1 parent 0c994b7 commit 9d9c10e

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
/**
1212
* Advisor for standard ChatMemory implementations
13+
*
1314
* @author Mark Pollack
1415
* @since 1.0.0
1516
*/
@@ -19,8 +20,8 @@ public AbstractConversationHistoryAdvisor(ChatMemory chatMemory) {
1920
this(chatMemory, ChatMemory.DEFAULT_CONVERSATION_ID, true, DEFAULT_CHAT_MEMORY_PRECEDENCE_ORDER);
2021
}
2122

22-
public AbstractConversationHistoryAdvisor(ChatMemory chatMemory, String defaultConversationId, boolean protectFromBlocking,
23-
int order) {
23+
public AbstractConversationHistoryAdvisor(ChatMemory chatMemory, String defaultConversationId,
24+
boolean protectFromBlocking, int order) {
2425
super(chatMemory, defaultConversationId, protectFromBlocking, order);
2526
}
2627

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ public Flux<ChatClientResponse> adviseStream(ChatClientRequest chatClientRequest
7878
@Override
7979
protected ChatClientRequest before(ChatClientRequest request) {
8080
String conversationId = this.doGetConversationId(request.context());
81-
81+
8282
// Add the new user messages from the current prompt to memory
8383
List<UserMessage> newUserMessages = request.prompt().getUserMessages();
8484
for (UserMessage userMessage : newUserMessages) {
8585
this.getChatMemoryStore().add(conversationId, userMessage);
8686
}
87-
87+
8888
// Use the parent class implementation to handle retrieving and applying messages
8989
return super.before(request);
9090
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,15 @@ public Flux<ChatClientResponse> adviseStream(ChatClientRequest chatClientRequest
118118
@Override
119119
protected ChatClientRequest before(ChatClientRequest chatClientRequest) {
120120
String conversationId = this.doGetConversationId(chatClientRequest.context());
121-
121+
122122
// 1. Add all user messages from the current prompt to memory
123123
List<UserMessage> userMessages = chatClientRequest.prompt().getUserMessages();
124124
for (UserMessage userMessage : userMessages) {
125125
this.getChatMemoryStore().add(conversationId, userMessage);
126126
logger.info("[PromptChatMemoryAdvisor.before] Added USER message to memory for conversationId={}: {}",
127127
conversationId, userMessage.getText());
128128
}
129-
129+
130130
// 2. Retrieve the chat memory for the current conversation.
131131
List<Message> memoryMessages = this.getChatMemoryStore().get(conversationId);
132132
logger.info("[PromptChatMemoryAdvisor.before] Memory after USER add for conversationId={}: {}", conversationId,

0 commit comments

Comments
 (0)