Skip to content

Commit c78d473

Browse files
committed
fix: initialize comprehensive and curated history in constructor
The ChatBase constructor was ignoring its parameters and always initializing comprehensiveHistory and curatedHistory as empty lists. This prevented any pre-existing conversation history from being used.
1 parent fb1f53d commit c78d473

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/com/google/genai/ChatBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class ChatBase {
3737
private static final Logger logger = Logger.getLogger(ChatBase.class.getName());
3838

3939
ChatBase(List<Content> comprehensiveHistory, List<Content> curatedHistory) {
40-
this.comprehensiveHistory = new ArrayList<>();
41-
this.curatedHistory = new ArrayList<>();
40+
this.comprehensiveHistory = comprehensiveHistory;
41+
this.curatedHistory = curatedHistory;
4242
}
4343

4444
/**

0 commit comments

Comments
 (0)