Bug description
java.lang.IllegalStateException: Duplicate key Query[text=你是谁, history=[], context={}] (attempted merging values [[]] and [[]])
Environment
spring-ai: 1.1.2
jdk: 17
Steps to reproduce
If I customize the queryExpander, when executing the queryExpander to add historical queries to the List, if there are duplicates in my historical queries, an error will occur in the following line: Map<Query, List<List<Document>>> documentsForQuery = (Map)expandedQueries.stream().map((query) -> CompletableFuture.supplyAsync(() -> this.getDocumentsForQuery(query), this.taskExecutor)).toList().stream().map(CompletableFuture::join).collect(Collectors.toMap(Map.Entry::getKey, (entry) -> List.of((List)entry.getValue())));
Expected behavior
Add (v1, v2) -> v2 after toMap