pub struct OllamaConfig {
pub host: String,
pub model: String,
pub num_ctx: Option<u32>,
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub top_k: Option<i32>,
}Available on crate feature
models only.Expand description
Configuration for connecting to an Ollama server.
Fields§
§host: StringOllama server host URL. Default: http://localhost:11434
model: StringModel name to use (e.g., “llama3.2”, “mistral”, “qwen2.5”)
num_ctx: Option<u32>Context window size (num_ctx). None uses model default.
temperature: Option<f32>Temperature for generation. None uses model default.
top_p: Option<f32>Top-p sampling. None uses model default.
top_k: Option<i32>Top-k sampling. None uses model default.
Implementations§
Source§impl OllamaConfig
impl OllamaConfig
Sourcepub fn new(model: impl Into<String>) -> OllamaConfig
Available on crate feature ollama only.
pub fn new(model: impl Into<String>) -> OllamaConfig
ollama only.Create a new config with just the model name, using default host.
Trait Implementations§
Source§impl Clone for OllamaConfig
impl Clone for OllamaConfig
Source§fn clone(&self) -> OllamaConfig
fn clone(&self) -> OllamaConfig
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 moreSource§impl Debug for OllamaConfig
impl Debug for OllamaConfig
Source§impl Default for OllamaConfig
impl Default for OllamaConfig
Source§fn default() -> OllamaConfig
fn default() -> OllamaConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OllamaConfig
impl RefUnwindSafe for OllamaConfig
impl Send for OllamaConfig
impl Sync for OllamaConfig
impl Unpin for OllamaConfig
impl UnwindSafe for OllamaConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request