Skip to content

Commit 6ae1c13

Browse files
committed
fix(vectorstore): expose protectFromBlocking option in VectorStoreChatMemoryAdvisor.Builder
Previously, protectFromBlocking was hardcoded and not configurable via the builder. This change ensures the builder passes its protectFromBlocking value to the advisor, making all constructor options available to users.
1 parent d5bbb13 commit 6ae1c13

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

advisors/spring-ai-advisors-vector-store/src/main/java/org/springframework/ai/chat/client/advisor/vectorstore/VectorStoreChatMemoryAdvisor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ public class VectorStoreChatMemoryAdvisor extends AbstractChatMemoryAdvisor<Vect
7070
private final PromptTemplate systemPromptTemplate;
7171

7272
private VectorStoreChatMemoryAdvisor(VectorStore vectorStore, String defaultConversationId,
73-
int chatHistoryWindowSize, PromptTemplate systemPromptTemplate, int order) {
74-
super(vectorStore, defaultConversationId, chatHistoryWindowSize, true, order);
73+
int chatHistoryWindowSize, boolean protectFromBlocking, PromptTemplate systemPromptTemplate, int order) {
74+
super(vectorStore, defaultConversationId, chatHistoryWindowSize, protectFromBlocking, order);
7575
this.systemPromptTemplate = systemPromptTemplate;
7676
}
7777

@@ -194,7 +194,7 @@ public Builder systemPromptTemplate(PromptTemplate systemPromptTemplate) {
194194
@Override
195195
public VectorStoreChatMemoryAdvisor build() {
196196
return new VectorStoreChatMemoryAdvisor(this.chatMemory, this.conversationId, this.chatMemoryRetrieveSize,
197-
this.systemPromptTemplate, this.order);
197+
this.protectFromBlocking, this.systemPromptTemplate, this.order);
198198
}
199199

200200
}

0 commit comments

Comments
 (0)