pub struct BasicNanoAgent<I: Serialize + JsonSchema + Send + 'static = BasicChatInputSchema, O: for<'de> Deserialize<'de> + JsonSchema + Send + 'static = BasicChatOutputSchema> { /* private fields */ }Expand description
Wraps AgentInner and implements NanoAgent with no extra state or hooks.
Type parameters default to BasicChatInputSchema / BasicChatOutputSchema. For custom
structured I/O, set I and O explicitly, e.g.
BasicNanoAgent<BasicChatInputSchema, MyOutput>::new(config).
Implementations§
Source§impl<I, O> BasicNanoAgent<I, O>where
I: Serialize + JsonSchema + Send + 'static,
O: for<'de> Deserialize<'de> + JsonSchema + Send + 'static,
impl<I, O> BasicNanoAgent<I, O>where
I: Serialize + JsonSchema + Send + 'static,
O: for<'de> Deserialize<'de> + JsonSchema + Send + 'static,
pub fn new(config: AgentConfig) -> Self
Trait Implementations§
Source§impl<I, O> NanoAgent<I, O> for BasicNanoAgent<I, O>where
I: Serialize + JsonSchema + Send + 'static,
O: Serialize + for<'de> Deserialize<'de> + JsonSchema + Send + 'static,
impl<I, O> NanoAgent<I, O> for BasicNanoAgent<I, O>where
I: Serialize + JsonSchema + Send + 'static,
O: Serialize + for<'de> Deserialize<'de> + JsonSchema + Send + 'static,
fn get_inner(&self) -> &AgentInner
fn get_inner_mut(&mut self) -> &mut AgentInner
fn register_context_provider( &mut self, provider: impl ContextProvider + Send + 'static, )
Auto Trait Implementations§
impl<I, O> Freeze for BasicNanoAgent<I, O>
impl<I = BasicChatInputSchema, O = BasicChatOutputSchema> !RefUnwindSafe for BasicNanoAgent<I, O>
impl<I, O> Send for BasicNanoAgent<I, O>
impl<I = BasicChatInputSchema, O = BasicChatOutputSchema> !Sync for BasicNanoAgent<I, O>
impl<I, O> Unpin for BasicNanoAgent<I, O>
impl<I, O> UnsafeUnpin for BasicNanoAgent<I, O>
impl<I = BasicChatInputSchema, O = BasicChatOutputSchema> !UnwindSafe for BasicNanoAgent<I, O>
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