pub struct WorkflowEmbeddingProvider<P> { /* private fields */ }Expand description
Embedding provider wrapper that tracks costs per workflow
Implementations§
Source§impl<P> WorkflowEmbeddingProvider<P>
impl<P> WorkflowEmbeddingProvider<P>
Sourcepub fn new(provider: P, tracker: WorkflowTracker, workflow_id: String) -> Self
pub fn new(provider: P, tracker: WorkflowTracker, workflow_id: String) -> Self
Create a new workflow embedding provider
Sourcepub fn with_pricing(self, pricing: ModelPricing) -> Self
pub fn with_pricing(self, pricing: ModelPricing) -> Self
Set the pricing model for cost calculation
Sourcepub fn tracker(&self) -> &WorkflowTracker
pub fn tracker(&self) -> &WorkflowTracker
Get the workflow tracker
Sourcepub fn stats(&self) -> WorkflowStats
pub fn stats(&self) -> WorkflowStats
Get statistics for this workflow
Trait Implementations§
Source§impl<P: EmbeddingProvider> EmbeddingProvider for WorkflowEmbeddingProvider<P>
impl<P: EmbeddingProvider> EmbeddingProvider for WorkflowEmbeddingProvider<P>
fn embed<'life0, 'async_trait>(
&'life0 self,
request: EmbeddingRequest,
) -> Pin<Box<dyn Future<Output = Result<EmbeddingResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl<P> Freeze for WorkflowEmbeddingProvider<P>where
P: Freeze,
impl<P> RefUnwindSafe for WorkflowEmbeddingProvider<P>where
P: RefUnwindSafe,
impl<P> Send for WorkflowEmbeddingProvider<P>where
P: Send,
impl<P> Sync for WorkflowEmbeddingProvider<P>where
P: Sync,
impl<P> Unpin for WorkflowEmbeddingProvider<P>where
P: Unpin,
impl<P> UnwindSafe for WorkflowEmbeddingProvider<P>where
P: UnwindSafe,
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