pub struct LlmOptionsBuilder { /* private fields */ }Expand description
Builder for LlmOptions.
Implementations§
Source§impl LlmOptionsBuilder
impl LlmOptionsBuilder
Sourcepub fn system_prompt(self, prompt: impl Into<String>) -> Self
pub fn system_prompt(self, prompt: impl Into<String>) -> Self
Set a custom system prompt. Pass "" for no system prompt.
Sourcepub fn model(self, model: impl Into<String>) -> Self
pub fn model(self, model: impl Into<String>) -> Self
Set the model (e.g., "claude-sonnet-4-20250514").
Sourcepub fn thinking(self, config: ThinkingConfig) -> Self
pub fn thinking(self, config: ThinkingConfig) -> Self
Enable extended thinking.
Sourcepub fn max_output_tokens(self, tokens: u32) -> Self
pub fn max_output_tokens(self, tokens: u32) -> Self
Set maximum output tokens (1–32000).
Sourcepub fn build(self) -> LlmOptions
pub fn build(self) -> LlmOptions
Build the options.
Trait Implementations§
Source§impl Debug for LlmOptionsBuilder
impl Debug for LlmOptionsBuilder
Source§impl Default for LlmOptionsBuilder
impl Default for LlmOptionsBuilder
Source§fn default() -> LlmOptionsBuilder
fn default() -> LlmOptionsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LlmOptionsBuilder
impl RefUnwindSafe for LlmOptionsBuilder
impl Send for LlmOptionsBuilder
impl Sync for LlmOptionsBuilder
impl Unpin for LlmOptionsBuilder
impl UnsafeUnpin for LlmOptionsBuilder
impl UnwindSafe for LlmOptionsBuilder
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> 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>
Converts
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>
Converts
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