Skip to content

Commit

Permalink
Fixed history loading ending with a response
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-be committed Oct 17, 2020
1 parent 642b30d commit 2db5ac1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pipelines/conversation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,10 @@ impl Conversation {
fn append(&mut self, text: &str, ids: &[i64]) {
match &self.new_user_input {
Some(_) => {
self.mark_processed();
if self.past_user_inputs.len() >= self.generated_responses.len() {
self.generated_responses.push(text.to_string());
} else {
self.mark_processed();
let _ = self.add_user_input(text);
}
}
Expand Down

0 comments on commit 2db5ac1

Please sign in to comment.