pub struct TextRequest<'a> {
pub model: Completions,
pub prompt: &'a str,
pub temperature: f64,
pub stop: Vec<&'a str>,
pub n: Option<usize>,
pub max_tokens: usize,
}
Expand description
{"model": "text-davinci-003", "prompt": "Say this is a test", "temperature": 0, "max_tokens": 7}
Fields§
§model: Completions
§prompt: &'a str
§temperature: f64
§stop: Vec<&'a str>
Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
n: Option<usize>
number of completions
max_tokens: usize
Trait Implementations§
Source§impl<'a> Clone for TextRequest<'a>
impl<'a> Clone for TextRequest<'a>
Source§fn clone(&self) -> TextRequest<'a>
fn clone(&self) -> TextRequest<'a>
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 TextRequest<'_>
impl Default for TextRequest<'_>
Auto Trait Implementations§
impl<'a> Freeze for TextRequest<'a>
impl<'a> RefUnwindSafe for TextRequest<'a>
impl<'a> Send for TextRequest<'a>
impl<'a> Sync for TextRequest<'a>
impl<'a> Unpin for TextRequest<'a>
impl<'a> UnwindSafe for TextRequest<'a>
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