pub struct LlmMockConfig {
pub canned_reply: String,
pub default_model: String,
pub echo_prompt: bool,
pub stream_chunk_delay_ms: u64,
pub mode: LlmMockMode,
pub upstream_base_url: Option<String>,
pub upstream_api_key: Option<String>,
pub cassette_path: Option<PathBuf>,
}Expand description
Runtime configuration for the mock LLM endpoint.
Fields§
§canned_reply: StringCanned assistant reply used when no per-request override applies.
default_model: StringModel id echoed back in responses when the request omits one.
echo_prompt: boolWhen true, prepend a short echo of the user’s last message to the reply so callers can confirm round-trip wiring.
stream_chunk_delay_ms: u64Per-chunk delay for streaming responses (milliseconds). 0 = no delay.
mode: LlmMockModeReply sourcing mode. Defaults to LlmMockMode::Mock.
upstream_base_url: Option<String>Base URL of the OpenAI/Anthropic-compatible upstream (no trailing path),
e.g. https://api.openai.com or http://localhost:11434. Required for
proxy and record.
upstream_api_key: Option<String>API key forwarded to the upstream (Bearer for OpenAI, x-api-key for
Anthropic). When None, no auth header is sent (fine for local upstreams).
cassette_path: Option<PathBuf>Cassette file for record / replay. Loaded at startup; record
rewrites it as new prompts are captured.
Trait Implementations§
Source§impl Clone for LlmMockConfig
impl Clone for LlmMockConfig
Source§fn clone(&self) -> LlmMockConfig
fn clone(&self) -> LlmMockConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LlmMockConfig
impl Debug for LlmMockConfig
Auto Trait Implementations§
impl Freeze for LlmMockConfig
impl RefUnwindSafe for LlmMockConfig
impl Send for LlmMockConfig
impl Sync for LlmMockConfig
impl Unpin for LlmMockConfig
impl UnsafeUnpin for LlmMockConfig
impl UnwindSafe for LlmMockConfig
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
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> 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 moreSource§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>
T in a tonic::Request