agent2: Fix remaining update_model_request_usage todos (#36570)
Release Notes: - N/A
This commit is contained in:
@@ -1563,12 +1563,11 @@ impl Thread {
|
||||
let text = match event {
|
||||
LanguageModelCompletionEvent::Text(text) => text,
|
||||
LanguageModelCompletionEvent::StatusUpdate(
|
||||
CompletionRequestStatus::UsageUpdated { .. },
|
||||
CompletionRequestStatus::UsageUpdated { amount, limit },
|
||||
) => {
|
||||
// this.update(cx, |thread, cx| {
|
||||
// thread.update_model_request_usage(amount as u32, limit, cx);
|
||||
// })?;
|
||||
// TODO: handle usage update
|
||||
this.update(cx, |thread, cx| {
|
||||
thread.update_model_request_usage(amount, limit, cx);
|
||||
})?;
|
||||
continue;
|
||||
}
|
||||
_ => continue,
|
||||
@@ -1629,12 +1628,11 @@ impl Thread {
|
||||
let text = match event {
|
||||
LanguageModelCompletionEvent::Text(text) => text,
|
||||
LanguageModelCompletionEvent::StatusUpdate(
|
||||
CompletionRequestStatus::UsageUpdated { .. },
|
||||
CompletionRequestStatus::UsageUpdated { amount, limit },
|
||||
) => {
|
||||
// this.update(cx, |thread, cx| {
|
||||
// thread.update_model_request_usage(amount as u32, limit, cx);
|
||||
// })?;
|
||||
// TODO: handle usage update
|
||||
this.update(cx, |thread, cx| {
|
||||
thread.update_model_request_usage(amount, limit, cx);
|
||||
})?;
|
||||
continue;
|
||||
}
|
||||
_ => continue,
|
||||
|
||||
Reference in New Issue
Block a user