pub struct AnthropicModelOptions {Show 14 fields
pub model_id: Option<String>,
pub max_tokens: Option<u64>,
pub temperature: Option<f64>,
pub top_p: Option<f64>,
pub context_window_limit: Option<u64>,
pub model_info: Option<ModelInfo>,
pub stop_sequences: Option<Vec<String>>,
pub params: Option<JsonValue>,
pub anthropic_tools: Option<Vec<JsonValue>>,
pub betas: Option<Vec<String>>,
pub use_native_token_count: Option<bool>,
pub cache_config: Option<CacheConfig>,
pub api_key: Option<String>,
pub client_config: Option<AnthropicClientConfig>,
}Expand description
Options for AnthropicModel::new (AnthropicModelOptions): the AnthropicModelConfig
fields and the client ones.
AnthropicModel::builder builds them and the model in one go; the options’ own builder ends
with build_options.
Fields§
§model_id: Option<String>§max_tokens: Option<u64>§temperature: Option<f64>§top_p: Option<f64>§context_window_limit: Option<u64>§model_info: Option<ModelInfo>§stop_sequences: Option<Vec<String>>§params: Option<JsonValue>§anthropic_tools: Option<Vec<JsonValue>>§betas: Option<Vec<String>>§use_native_token_count: Option<bool>§cache_config: Option<CacheConfig>§api_key: Option<String>The API key. Defaults to ANTHROPIC_API_KEY.
client_config: Option<AnthropicClientConfig>How the client reaches the API.
Implementations§
Source§impl AnthropicModelOptions
impl AnthropicModelOptions
Sourcepub fn builder() -> AnthropicModelOptionsBuilder
pub fn builder() -> AnthropicModelOptionsBuilder
Create an instance of AnthropicModelOptions using the builder syntax
Trait Implementations§
Source§impl Clone for AnthropicModelOptions
impl Clone for AnthropicModelOptions
Source§impl Debug for AnthropicModelOptions
impl Debug for AnthropicModelOptions
Source§impl Default for AnthropicModelOptions
impl Default for AnthropicModelOptions
Source§impl From<AnthropicModelConfig> for AnthropicModelOptions
impl From<AnthropicModelConfig> for AnthropicModelOptions
Source§fn from(config: AnthropicModelConfig) -> Self
fn from(config: AnthropicModelConfig) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AnthropicModelOptions
impl PartialEq for AnthropicModelOptions
impl StructuralPartialEq for AnthropicModelOptions
Auto Trait Implementations§
impl Freeze for AnthropicModelOptions
impl RefUnwindSafe for AnthropicModelOptions
impl Send for AnthropicModelOptions
impl Sync for AnthropicModelOptions
impl Unpin for AnthropicModelOptions
impl UnsafeUnpin for AnthropicModelOptions
impl UnwindSafe for AnthropicModelOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 moreCreates a shared type from an unshared type.