pub struct AnthropicConfig {
pub api_key: String,
pub model: String,
pub base_url: String,
pub max_tokens: u32,
pub top_p: Option<f64>,
pub stop: Option<Vec<String>>,
}Fields§
§api_key: String§model: String§base_url: String§max_tokens: u32§top_p: Option<f64>§stop: Option<Vec<String>>Implementations§
Source§impl AnthropicConfig
impl AnthropicConfig
pub fn new(api_key: impl Into<String>, model: impl Into<String>) -> Self
pub fn with_base_url(self, url: impl Into<String>) -> Self
pub fn with_max_tokens(self, max_tokens: u32) -> Self
pub fn with_top_p(self, top_p: f64) -> Self
pub fn with_stop(self, stop: Vec<String>) -> Self
Trait Implementations§
Source§impl Clone for AnthropicConfig
impl Clone for AnthropicConfig
Source§fn clone(&self) -> AnthropicConfig
fn clone(&self) -> AnthropicConfig
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for AnthropicConfig
impl RefUnwindSafe for AnthropicConfig
impl Send for AnthropicConfig
impl Sync for AnthropicConfig
impl Unpin for AnthropicConfig
impl UnsafeUnpin for AnthropicConfig
impl UnwindSafe for AnthropicConfig
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