Struct llm_base::InferenceWithPromptParameters
source · pub struct InferenceWithPromptParameters {
pub play_back_previous_tokens: bool,
pub maximum_token_count: Option<usize>,
}Expand description
Settings specific to InferenceSession::infer InferenceSession::infer_with_params.
Fields§
§play_back_previous_tokens: boolWhether or not to call the callback with the previous tokens that were encountered in this session.
You likely want to turn this on if you’re using a session that has been rehydrated from a snapshot.
maximum_token_count: Option<usize>The maximum number of tokens to generate.
Trait Implementations§
source§impl Clone for InferenceWithPromptParameters
impl Clone for InferenceWithPromptParameters
source§fn clone(&self) -> InferenceWithPromptParameters
fn clone(&self) -> InferenceWithPromptParameters
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Default for InferenceWithPromptParameters
impl Default for InferenceWithPromptParameters
source§fn default() -> InferenceWithPromptParameters
fn default() -> InferenceWithPromptParameters
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for InferenceWithPromptParameters
impl<'de> Deserialize<'de> for InferenceWithPromptParameters
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<InferenceWithPromptParameters> for InferenceWithPromptParameters
impl PartialEq<InferenceWithPromptParameters> for InferenceWithPromptParameters
source§fn eq(&self, other: &InferenceWithPromptParameters) -> bool
fn eq(&self, other: &InferenceWithPromptParameters) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for InferenceWithPromptParameters
impl Eq for InferenceWithPromptParameters
impl StructuralEq for InferenceWithPromptParameters
impl StructuralPartialEq for InferenceWithPromptParameters
Auto Trait Implementations§
impl RefUnwindSafe for InferenceWithPromptParameters
impl Send for InferenceWithPromptParameters
impl Sync for InferenceWithPromptParameters
impl Unpin for InferenceWithPromptParameters
impl UnwindSafe for InferenceWithPromptParameters
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