pub struct Prompt {
pub text: String,
pub tokens: usize,
pub dropped_tokens: usize,
}Expand description
An assembled prompt, with what it cost and what it had to leave out.
Fields§
§text: StringThe text to send.
tokens: usizeIts estimated size, by estimate_tokens.
dropped_tokens: usizeDiff tokens dropped to fit the budget, or 0.
Reported rather than silently absorbed: a review of a truncated file is a review of part of it, and a run that does not say so reads as coverage it did not have.
Trait Implementations§
impl Eq for Prompt
impl StructuralPartialEq for Prompt
Auto Trait Implementations§
impl Freeze for Prompt
impl RefUnwindSafe for Prompt
impl Send for Prompt
impl Sync for Prompt
impl Unpin for Prompt
impl UnsafeUnpin for Prompt
impl UnwindSafe for Prompt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.