pub struct SimpleStreamOptions {
pub api_key: Option<String>,
pub auth_token: Option<String>,
pub max_tokens: Option<usize>,
pub temperature: Option<f64>,
pub reasoning: Option<ThinkingLevel>,
pub thinking_budget_tokens: Option<usize>,
pub cache_control: bool,
pub timeout_ms: Option<u64>,
}Expand description
Options for a streaming request.
Fields§
§api_key: Option<String>§auth_token: Option<String>If set, sent as Authorization: Bearer <token> instead of x-api-key.
max_tokens: Option<usize>§temperature: Option<f64>§reasoning: Option<ThinkingLevel>§thinking_budget_tokens: Option<usize>§cache_control: boolAttach cache_control: ephemeral to the system prompt and the last
user message to enable Anthropic prompt caching. Default: true.
timeout_ms: Option<u64>Implementations§
Source§impl SimpleStreamOptions
impl SimpleStreamOptions
pub fn cache_control(self, on: bool) -> Self
Trait Implementations§
Source§impl Clone for SimpleStreamOptions
impl Clone for SimpleStreamOptions
Source§impl Debug for SimpleStreamOptions
impl Debug for SimpleStreamOptions
Auto Trait Implementations§
impl Forget for SimpleStreamOptions
impl Freeze for SimpleStreamOptions
impl Move for SimpleStreamOptions
impl RefUnwindSafe for SimpleStreamOptions
impl Send for SimpleStreamOptions
impl Sync for SimpleStreamOptions
impl Unpin for SimpleStreamOptions
impl UnsafeUnpin for SimpleStreamOptions
impl UnwindSafe for SimpleStreamOptions
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