pub struct LlmMockBuilder { /* private fields */ }Expand description
Fluent builder for a single LLM mock expectation
(mirrors org.mockserver.client.LlmMockBuilder).
Implementations§
Source§impl LlmMockBuilder
impl LlmMockBuilder
Sourcepub fn with_provider(self, provider: impl Into<String>) -> Self
pub fn with_provider(self, provider: impl Into<String>) -> Self
Set the LLM provider (use a Provider constant).
Sourcepub fn with_model(self, model: impl Into<String>) -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
Set the model name.
Sourcepub fn responding_with(self, response: impl Into<LlmResponseBody>) -> Self
pub fn responding_with(self, response: impl Into<LlmResponseBody>) -> Self
Set the response body. Passing a Completion clears any embedding and
vice-versa.
Sourcepub fn apply_to(&self, client: &MockServerClient) -> Result<Value>
pub fn apply_to(&self, client: &MockServerClient) -> Result<Value>
Build and register the expectation on the given client.
Trait Implementations§
Source§impl Clone for LlmMockBuilder
impl Clone for LlmMockBuilder
Source§fn clone(&self) -> LlmMockBuilder
fn clone(&self) -> LlmMockBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LlmMockBuilder
impl RefUnwindSafe for LlmMockBuilder
impl Send for LlmMockBuilder
impl Sync for LlmMockBuilder
impl Unpin for LlmMockBuilder
impl UnsafeUnpin for LlmMockBuilder
impl UnwindSafe for LlmMockBuilder
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