pub struct ScriptedChatModel { /* private fields */ }Implementations§
Source§impl ScriptedChatModel
impl ScriptedChatModel
pub fn new(responses: Vec<ChatResponse>) -> Self
Trait Implementations§
Source§impl ChatModel for ScriptedChatModel
impl ChatModel for ScriptedChatModel
fn chat<'life0, 'async_trait>(
&'life0 self,
_request: ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatResponse, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn profile(&self) -> Option<ModelProfile>
fn profile(&self) -> Option<ModelProfile>
Return the model’s capability profile, if known.
fn stream_chat( &self, request: ChatRequest, ) -> Pin<Box<dyn Stream<Item = Result<AIMessageChunk, SynapticError>> + Send + '_>>
Source§impl Clone for ScriptedChatModel
impl Clone for ScriptedChatModel
Source§fn clone(&self) -> ScriptedChatModel
fn clone(&self) -> ScriptedChatModel
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 moreAuto Trait Implementations§
impl Freeze for ScriptedChatModel
impl !RefUnwindSafe for ScriptedChatModel
impl Send for ScriptedChatModel
impl Sync for ScriptedChatModel
impl Unpin for ScriptedChatModel
impl UnsafeUnpin for ScriptedChatModel
impl !UnwindSafe for ScriptedChatModel
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