pub struct CompletionRequest {
pub system: Option<String>,
pub prompt: String,
pub max_tokens: u32,
pub temperature: Option<f64>,
pub reasoning: bool,
pub effort: Option<Effort>,
pub thinking_budget: Option<u32>,
pub json_list: bool,
}Expand description
A single-turn completion request. The model is bound to the client.
Fields§
§system: Option<String>Optional system prompt.
prompt: StringThe user message.
max_tokens: u32Upper bound on generated tokens, reasoning included.
temperature: Option<f64>Sampling temperature; the provider default applies when None.
reasoning: boolWhether to ask the model for reasoning.
effort: Option<Effort>Reasoning effort, used only when reasoning is true.
thinking_budget: Option<u32>Fixed extended-thinking token budget, used only when reasoning is true and
only by the anthropic protocol client. When set, it takes precedence over
effort for that client: the request asks for a fixed thinking budget instead
of adaptive thinking, and omits output_config.effort.
json_list: boolWhether the answer must be a list of strings. The openai protocol client then
asks for structured output (a JSON schema); other clients ignore it. The list
stages set it so compliant models return parseable JSON.
Implementations§
Trait Implementations§
Source§impl Clone for CompletionRequest
impl Clone for CompletionRequest
Source§impl Debug for CompletionRequest
impl Debug for CompletionRequest
Source§impl PartialEq for CompletionRequest
impl PartialEq for CompletionRequest
impl StructuralPartialEq for CompletionRequest
Auto Trait Implementations§
impl Freeze for CompletionRequest
impl RefUnwindSafe for CompletionRequest
impl Send for CompletionRequest
impl Sync for CompletionRequest
impl Unpin for CompletionRequest
impl UnsafeUnpin for CompletionRequest
impl UnwindSafe for CompletionRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more