parent
846ed6adf9
commit
f63036548c
2 changed files with 140 additions and 3 deletions
|
@ -1041,6 +1041,14 @@ impl Thread {
|
|||
messages.extend(message.to_request());
|
||||
}
|
||||
|
||||
if let Some(last_user_message) = messages
|
||||
.iter_mut()
|
||||
.rev()
|
||||
.find(|message| message.role == Role::User)
|
||||
{
|
||||
last_user_message.cache = true;
|
||||
}
|
||||
|
||||
messages
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue