pub enum DynAgent {
OpenAI(Agent<OpenAIModel>),
Anthropic(Agent<AnthropicModel>),
Gemini(Agent<GeminiModel>),
}Expand description
Dynamic agent that can be any provider’s agent type
Variants§
Implementations§
Source§impl DynAgent
impl DynAgent
Sourcepub async fn prompt(&self, msg: &str) -> Result<String, PromptError>
pub async fn prompt(&self, msg: &str) -> Result<String, PromptError>
Simple prompt - returns response string
Sourcepub async fn prompt_multi_turn(
&self,
msg: &str,
depth: usize,
) -> Result<String, PromptError>
pub async fn prompt_multi_turn( &self, msg: &str, depth: usize, ) -> Result<String, PromptError>
Multi-turn prompt with specified depth for tool calling
Sourcepub async fn prompt_extended(
&self,
msg: &str,
depth: usize,
) -> Result<PromptResponse, PromptError>
pub async fn prompt_extended( &self, msg: &str, depth: usize, ) -> Result<PromptResponse, PromptError>
Multi-turn prompt with extended details (token usage, etc.)
Auto Trait Implementations§
impl Freeze for DynAgent
impl !RefUnwindSafe for DynAgent
impl Send for DynAgent
impl Sync for DynAgent
impl Unpin for DynAgent
impl !UnwindSafe for DynAgent
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
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> 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>
Converts
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>
Converts
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