pub struct LlmConfig {
pub model: String,
pub endpoint: String,
pub dry_run: bool,
pub target_grade: f64,
pub max_refinement_attempts: usize,
pub timeout_secs: u64,
pub cache_disabled: bool,
pub cache_dir: Option<PathBuf>,
}Expand description
Configuration for the LLM plugin.
Fields§
§model: StringModel name (e.g., "llama3", "mistral").
endpoint: StringOllama API endpoint.
dry_run: boolIf true, print generated text but don’t write files.
target_grade: f64Target Flesch-Kincaid Grade Level (default: 8.0).
max_refinement_attempts: usizeMax refinement attempts if readability exceeds target (default: 1).
timeout_secs: u64Per-call HTTP timeout for the local LLM endpoint, in seconds
(default: 120). Set via llm.timeout_secs in ssg.toml.
Exceeding this budget returns
SsgError::LlmTimeout —
no zombie subprocess is left behind because the call goes
through ureq, not curl (issue #520).
cache_disabled: boolWhen true, skip the deterministic content-hash cache and
always perform a live inference (issue #528). Driven by the
--no-llm-cache CLI flag and the SSG_NO_LLM_CACHE env var
so users debugging non-determinism can rule the cache out
without nuking it on disk.
cache_dir: Option<PathBuf>Optional override for the on-disk cache root. None resolves
to LlmCache::default_cache_dir at call time — the
platform-correct path (XDG / Library / %LOCALAPPDATA%)
chosen by LlmCache. Tests and operators wanting a
project-local cache override this directly.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LlmConfig
impl RefUnwindSafe for LlmConfig
impl Send for LlmConfig
impl Sync for LlmConfig
impl Unpin for LlmConfig
impl UnsafeUnpin for LlmConfig
impl UnwindSafe for LlmConfig
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
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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