Crate oxify_connect_llm

Crate oxify_connect_llm 

Source
Expand description

LLM provider connections for OxiFY

Structs§

AlternativeModel
Alternative model suggestion
AnthropicProvider
Anthropic (Claude) provider implementation
BatchConfig
Configuration for batch processing
BatchProvider
Batch provider that wraps any LLM provider with batching capabilities
BatchStats
Statistics about batch processing
BedrockProvider
AWS Bedrock provider for Claude models
BudgetLimit
Budget limit configuration
BudgetProvider
A provider that enforces budget limits
CacheStats
Cache statistics
CachedProvider
A wrapper that adds caching functionality to any LLM provider
ChainOfThought
Chain-of-thought prompt builder
CircuitBreakerConfig
Circuit breaker configuration
CircuitBreakerProvider
Circuit breaker wrapper for LLM providers
CodeBlock
Code block extracted from LLM response
CohereProvider
Cohere provider
CompressionStats
Compression statistics
ContentLengthInterceptor
Interceptor that enforces maximum content length
ContextualError
Enhanced error with context
DedupProvider
Request deduplication provider
DedupStats
Deduplication statistics
EmbeddingBatchProvider
Batch provider for embeddings
EmbeddingInterceptorProvider
Provider wrapper for embedding interceptors
EmbeddingRequest
EmbeddingResponse
EmbeddingUsage
ErrorContext
Error context for better debugging
ErrorContextBuilder
Helper to create common error contexts
Example
Example for few-shot learning
FallbackProvider
A provider that automatically falls back to alternative providers on failure
FewShotPrompt
Few-shot prompt builder
GeminiProvider
Google Gemini provider
HealthCheckConfig
Health check configuration
HealthCheckProvider
Health check provider wrapper
HealthStats
Health statistics
ImageInput
Image input for vision models
InstructionPrompt
Instruction-based prompt builder
InterceptorProvider
Provider wrapper that applies interceptors to requests and responses
LlamaCppProvider
llama.cpp server provider for local LLM inference
LlmCache
In-memory LLM response cache
LlmChunk
A chunk of streamed LLM response
LlmRequest
LlmRequestBuilder
Builder for constructing LLM requests easily
LlmResponse
LoadBalancer
Load balancer that distributes requests across multiple providers
LoadBalancerStats
Load balancer statistics
LoggingInterceptor
Interceptor that logs requests
Metrics
Metrics collector for LLM operations
MetricsProvider
Provider wrapper with metrics collection
MistralProvider
Mistral AI provider
ModelLimits
Token limits for common models
ModelPricing
Cost per 1K tokens for different providers/models (in USD cents) These are approximate values and should be updated as pricing changes
ModelRecommendation
Model recommendation response
ModelRecommender
Model recommender
ModelUtils
Model name utilities
ObservableProvider
Provider wrapper with tracing and logging
OllamaProvider
Ollama (local model) provider implementation
OpenAIProvider
OpenAI provider implementation
OtelEmbeddingProvider
OpenTelemetry embedding provider wrapper
OtelProvider
OpenTelemetry provider wrapper
PriorityQueueConfig
Configuration for priority queue
PriorityQueueProvider
Priority queue provider that wraps any LLM provider
PriorityQueueStats
Statistics about priority queue operations
PromptCompressor
Prompt compressor for optimizing token usage
PromptTemplate
A prompt template with variable substitution support
ProviderMetadata
Provider metadata for selection
ProviderSelector
Smart provider selector with automatic fallback
QuickRequest
Quick helpers for common request patterns
RateLimitConfig
Rate limit configuration
RateLimitProvider
Rate limiting provider wrapper
RateLimitStats
Rate limit statistics
RecommendationRequest
Model recommendation request
RequestValidator
Validates LLM requests before sending them to providers
ResponseAttributes
OpenTelemetry response attributes
ResponseUtils
Response post-processing utilities
RetryConfig
Configuration for retry behavior
RetryProvider
A wrapper that adds retry functionality to any LLM provider
RolePrompt
Role-based prompt builder
SanitizationInterceptor
Interceptor that sanitizes prompts by removing sensitive patterns
SelectionCriteria
Selection criteria for choosing an LLM provider
SemanticCache
Semantic cache using embeddings for similarity matching
SemanticCacheStats
Statistics for semantic cache performance
SemanticCachedProvider
Provider wrapper that adds semantic caching
SimilarityThreshold
Similarity threshold for semantic cache matching (0.0 to 1.0)
SpanAttributes
OpenTelemetry span attributes for LLM requests
StreamUsage
SystemPrompts
Common system prompts for different personas
TemplateLibrary
Template library for common prompt patterns
TimeoutConfig
Configuration for timeout behavior
TimeoutProvider
A wrapper that adds timeout functionality to any LLM provider
TokenUtils
Token estimation utilities
Tool
Tool/Function definition for function calling
ToolCall
Tool/Function call made by the LLM
TraceEvent
OpenTelemetry trace event
TrackedProvider
A wrapper that tracks usage for any LLM provider
Usage
UsageStats
Accumulated usage statistics
UsageTracker
Thread-safe usage tracker
ValidationRules
Validation rules for LLM requests
VllmProvider
vLLM provider for high-throughput LLM inference
WorkflowEmbeddingProvider
Embedding provider wrapper that tracks costs per workflow
WorkflowProvider
LLM provider wrapper that tracks costs per workflow
WorkflowStats
Statistics for a workflow
WorkflowTracker
Tracks costs and usage per workflow

Enums§

BudgetConstraint
Budget constraint for model selection
CircuitState
Circuit breaker state
HealthStatus
Health status
ImageSourceType
LlmError
LoadBalancingStrategy
Load balancing strategy
OptimizationGoal
Priority for model selection
RequestPriority
Request priority levels
Role
Role in a conversation
UseCase
Use case categories for model selection

Traits§

EmbeddingProvider
Trait for embedding providers
EmbeddingRequestInterceptor
Trait for intercepting embedding requests
EmbeddingResponseInterceptor
Trait for intercepting embedding responses
ErrorContextExt
Extension trait for adding context to errors
LlmProvider
Trait for LLM providers
RequestInterceptor
Trait for intercepting and modifying requests before they are sent
ResponseInterceptor
Trait for intercepting and modifying responses after they are received
StreamingLlmProvider
Trait for LLM providers that support streaming

Type Aliases§

LlmStream
Type alias for streaming response
Result