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.
This commit is contained in:
Mark Pollack
2025-05-09 15:29:32 -04:00
parent d5bbb131bf
commit 6ae1c13aee

View File

@@ -70,8 +70,8 @@ public class VectorStoreChatMemoryAdvisor extends AbstractChatMemoryAdvisor<Vect
private final PromptTemplate systemPromptTemplate;
private VectorStoreChatMemoryAdvisor(VectorStore vectorStore, String defaultConversationId,
int chatHistoryWindowSize, PromptTemplate systemPromptTemplate, int order) {
super(vectorStore, defaultConversationId, chatHistoryWindowSize, true, order);
int chatHistoryWindowSize, boolean protectFromBlocking, PromptTemplate systemPromptTemplate, int order) {
super(vectorStore, defaultConversationId, chatHistoryWindowSize, protectFromBlocking, order);
this.systemPromptTemplate = systemPromptTemplate;
}
@@ -194,7 +194,7 @@ public class VectorStoreChatMemoryAdvisor extends AbstractChatMemoryAdvisor<Vect
@Override
public VectorStoreChatMemoryAdvisor build() {
return new VectorStoreChatMemoryAdvisor(this.chatMemory, this.conversationId, this.chatMemoryRetrieveSize,
this.systemPromptTemplate, this.order);
this.protectFromBlocking, this.systemPromptTemplate, this.order);
}
}