pub struct IntegrationManager { /* private fields */ }Expand description
Integration Manager - manages all registered integrations
Implementations§
Source§impl IntegrationManager
impl IntegrationManager
Sourcepub fn new(config: IntegrationManagerConfig) -> Self
pub fn new(config: IntegrationManagerConfig) -> Self
Create a new integration manager
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default configuration
Sourcepub async fn register(&self, integration: BoxedIntegration)
pub async fn register(&self, integration: BoxedIntegration)
Register an integration
Sourcepub async fn register_all(&self, integrations: Vec<BoxedIntegration>)
pub async fn register_all(&self, integrations: Vec<BoxedIntegration>)
Register multiple integrations
Sourcepub async fn unregister(&self, name: &str) -> bool
pub async fn unregister(&self, name: &str) -> bool
Unregister an integration by name
Sourcepub async fn list_integrations(&self) -> Vec<&'static str>
pub async fn list_integrations(&self) -> Vec<&'static str>
Get list of registered integration names
Sourcepub async fn has_integration(&self, name: &str) -> bool
pub async fn has_integration(&self, name: &str) -> bool
Check if an integration is registered
Sourcepub async fn on_llm_start(&self, event: &LlmStartEvent) -> IntegrationResult<()>
pub async fn on_llm_start(&self, event: &LlmStartEvent) -> IntegrationResult<()>
Notify all integrations of LLM start
Sourcepub async fn on_llm_end(&self, event: &LlmEndEvent) -> IntegrationResult<()>
pub async fn on_llm_end(&self, event: &LlmEndEvent) -> IntegrationResult<()>
Notify all integrations of LLM end
Sourcepub async fn on_llm_error(&self, event: &LlmErrorEvent) -> IntegrationResult<()>
pub async fn on_llm_error(&self, event: &LlmErrorEvent) -> IntegrationResult<()>
Notify all integrations of LLM error
Sourcepub async fn on_guardrail_decision(
&self,
event: &GuardrailDecisionEvent,
) -> IntegrationResult<()>
pub async fn on_guardrail_decision( &self, event: &GuardrailDecisionEvent, ) -> IntegrationResult<()>
Notify all integrations of a sanitized guardrail decision.
Sourcepub async fn on_llm_stream(
&self,
event: &LlmStreamEvent,
) -> IntegrationResult<()>
pub async fn on_llm_stream( &self, event: &LlmStreamEvent, ) -> IntegrationResult<()>
Notify all integrations of LLM stream chunk
Sourcepub async fn on_embedding_start(
&self,
event: &EmbeddingStartEvent,
) -> IntegrationResult<()>
pub async fn on_embedding_start( &self, event: &EmbeddingStartEvent, ) -> IntegrationResult<()>
Notify all integrations of embedding start
Sourcepub async fn on_embedding_end(
&self,
event: &EmbeddingEndEvent,
) -> IntegrationResult<()>
pub async fn on_embedding_end( &self, event: &EmbeddingEndEvent, ) -> IntegrationResult<()>
Notify all integrations of embedding end
Sourcepub async fn on_embedding_error(
&self,
event: &EmbeddingErrorEvent,
) -> IntegrationResult<()>
pub async fn on_embedding_error( &self, event: &EmbeddingErrorEvent, ) -> IntegrationResult<()>
Notify all integrations of an embedding error
Sourcepub async fn on_cache_hit(&self, event: &CacheHitEvent) -> IntegrationResult<()>
pub async fn on_cache_hit(&self, event: &CacheHitEvent) -> IntegrationResult<()>
Notify all integrations of cache hit
Sourcepub async fn flush(&self) -> IntegrationResult<()>
pub async fn flush(&self) -> IntegrationResult<()>
Flush all integrations
Sourcepub async fn shutdown(&self) -> IntegrationResult<()>
pub async fn shutdown(&self) -> IntegrationResult<()>
Shutdown all integrations
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for IntegrationManager
impl !RefUnwindSafe for IntegrationManager
impl !UnwindSafe for IntegrationManager
impl Send for IntegrationManager
impl Sync for IntegrationManager
impl Unpin for IntegrationManager
impl UnsafeUnpin for IntegrationManager
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> BudgetAwareRouting for T
impl<T> BudgetAwareRouting for T
Source§fn filter_by_budget(
&self,
providers: Vec<String>,
budget_router: &BudgetAwareRouter,
) -> Vec<String>
fn filter_by_budget( &self, providers: Vec<String>, budget_router: &BudgetAwareRouter, ) -> Vec<String>
Filter providers based on budget availability
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 moreCreates a shared type from an unshared type.