pub struct GenerationRequest {
pub preset_id: Option<String>,
pub parameters: Option<GenerationParameters>,
pub custom_prompt: Option<String>,
pub existing_thread_id: Option<String>,
pub save_thread: bool,
}
Expand description
Request for text generation via core service.
Fields§
§preset_id: Option<String>
An optional id for a saved preset that contains generation parameters.
parameters: Option<GenerationParameters>
Model generation parameters. If a preset is provided, present parameter fields will override the preset values.
custom_prompt: Option<String>
A custom prompt (not a template) to use for generation.
existing_thread_id: Option<String>
An existing thread id for loadlng previous messages.
save_thread: bool
If true, the prompt and response will be saved to the existing thread id or a new thread.
Trait Implementations§
Source§impl Clone for GenerationRequest
impl Clone for GenerationRequest
Source§fn clone(&self) -> GenerationRequest
fn clone(&self) -> GenerationRequest
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 Debug for GenerationRequest
impl Debug for GenerationRequest
Source§impl Default for GenerationRequest
impl Default for GenerationRequest
Source§fn default() -> GenerationRequest
fn default() -> GenerationRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GenerationRequest
impl<'de> Deserialize<'de> for GenerationRequest
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
Auto Trait Implementations§
impl Freeze for GenerationRequest
impl RefUnwindSafe for GenerationRequest
impl Send for GenerationRequest
impl Sync for GenerationRequest
impl Unpin for GenerationRequest
impl UnwindSafe for GenerationRequest
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