Expand description
This is a library for interacting with the OpenAI API.
It provides a client for various OpenAI services, including
assistants, chat, embeddings, files, fine-tuning, images, models,
moderations, realtime, responses, and vector stores.
§Governing Principle : “Thin Client, Rich API”
This library follows the principle of “Thin Client, Rich API” - exposing all server-side functionality transparently while maintaining zero client-side intelligence or automatic behaviors.
Key Distinction: The principle prohibits automatic/implicit behaviors but explicitly allows and encourages explicit/configurable enterprise reliability features.
§Core Principles
- API Transparency: One-to-one mapping with
OpenAIAPI endpoints - Zero Automatic Behavior: No implicit decision-making or magic thresholds
- Explicit Control: Developer decides when, how, and why operations occur
- Information vs Action: Clear separation between data retrieval and state changes
- Configurable Reliability: Enterprise features available through explicit configuration
§Enterprise Reliability Features
The following enterprise reliability features are explicitly allowed when implemented with explicit configuration and transparent operation:
- Configurable Retry Logic: Exponential backoff with explicit configuration
- Circuit Breaker Pattern: Failure threshold management with transparent state
- Rate Limiting: Request throttling with explicit rate configuration
- Failover Support: Multi-endpoint configuration and automatic switching
- Health Checks: Periodic endpoint health verification and monitoring
§State Management Policy
✅ ALLOWED: Runtime-Stateful, Process-Stateless
- Connection pools, circuit breaker state, rate limiting buckets
- Retry logic state, failover state, health check state
- Runtime state that dies with the process
- No persistent storage or cross-process state
❌ PROHIBITED: Process-Persistent State
- File storage, databases, configuration accumulation
- State that survives process restarts
Implementation Requirements:
- Feature gating behind cargo features (
retry,circuit_breaker,rate_limiting,failover,health_checks) - Explicit configuration required (no automatic enabling)
- Transparent method naming (e.g.,
execute_with_retries(),execute_with_circuit_breaker()) - Zero overhead when features disabled
This design ensures predictable behavior, explicit control, and transparency for developers using the library.
Re-exports§
pub use client_api_accessors::ClientApiAccessors;pub use super::TimePeriod;pub use super::TimeSeriesPoint;pub use super::CostTrendPoint;pub use super::UsageSummary;pub use super::CostBreakdown;pub use super::EnterpriseClient;pub use super::cost_management::*;pub use super::region_management::*;pub use super::quota_management::*;
Modules§
- admin
- Administrative APIs Module
- administration_
shared - Structures shared across the Administration API endpoints (Users, Projects, Invites, API Keys, Rate Limits).
- advanced_
auth - Advanced Authentication Module
- assistants
- This module defines the
AssistantsAPI client, which provides methods for interacting with theOpenAIAssistants API. - assistants_
shared - Structures shared across the Assistants API, including Assistants, Threads, Messages, Runs, and Steps.
- audio
- This module defines the
AudioAPI client, which provides methods for interacting with theOpenAIAudio API. - audit_
logs_ shared - Structures related to Audit Logs API endpoints.
- batch_
shared - Structures shared across the Batch API.
- buffered_
streaming - Buffered Streaming for Smoother UX
- builder_
enhancements - Builder Pattern Enhancements
- chat
- This module defines the
ChatAPI client, which provides methods for interacting with theOpenAIChat API. - chat_
shared - This module defines shared data structures and components used across various
OpenAIchat-related API endpoints. It includes definitions for chat completion requests, messages, content parts, and tool-related structures. - client
- This module defines the
Clientstructure for interacting with theOpenAIAPI. It provides methods for making various API requests, handling authentication, and managing HTTP communication. - client_
api_ accessors - API Accessor Methods for
OpenAIClient - common
- Defines common data structures (components) used across various
OpenAIAPI responses and requests. Based on the components/schemas section of theOpenAPIspecification. - completions_
legacy - Structures related to the legacy Completions API.
- components
- This module defines shared data structures and components used across various
OpenAIAPI groups. It includes common types for requests, responses, and specific components like chat, audio, and image-related structures. - connection_
manager - Advanced HTTP Connection Management System
- curl_
generation - cURL generation functionality for
OpenAIAPI requests. - diagnostics
- General diagnostics functionality for monitoring API requests, performance, and errors.
- dynamic_
configuration - Dynamic Configuration Module
- embeddings
- This module defines the
EmbeddingsAPI client, which provides methods for interacting with theOpenAIEmbeddings API. - embeddings_
request - Request structures for embeddings API
- enhanced_
batch_ operations - Enhanced Batch Operations Module
- enhanced_
circuit_ breaker - Enhanced Circuit Breaker Module
- enhanced_
client - Enhanced
OpenAIClient with Advanced Connection Management - enhanced_
client_ builder - Builder for Enhanced
OpenAIClient Configuration - enhanced_
client_ performance - Performance Monitoring and Analysis for Enhanced
OpenAIClient - enhanced_
embeddings - Enhanced Embeddings Client with Intelligent Batching
- enhanced_
rate_ limiting - Enhanced Rate Limiting Module
- enhanced_
retry - Enhanced Retry Logic Module
- enterprise
- Enterprise Module
- environment
- This module defines the environment configuration for the
OpenAIAPI client. It includes traits and concrete implementations for managing API keys, organization IDs, project IDs, and base URLs. - error
- This module defines the error types for the
OpenAIAPI client. It includes a comprehensiveOpenAIErrorenum that covers various error scenarios, such as API errors, network issues, and serialization failures. - exposed
- Exposed namespace of the module.
- failover
- Failover Module
- files
- This module defines the
FilesAPI client, which provides methods for interacting with theOpenAIFiles API. - fine_
tuning - This module defines the
FineTuningAPI client, which provides methods for interacting with theOpenAIFine-tuning API. - fine_
tuning_ shared - Structures shared across the Fine-tuning API, including jobs, checkpoints, and events.
- health_
checks - Health Check Module
- images
- This module defines the
ImagesAPI client, which provides methods for interacting with theOpenAIImages API. - input
- Structures related to input content parts and messages.
- input_
validation - Input validation module for
OpenAIAPI requests - metrics_
framework - Metrics Collection Framework
- model_
comparison - Model Comparison for A/B Testing
- model_
deployment - Model Deployment Module
- model_
tuning - Model Tuning Module
- models
- This module defines the
ModelsAPI client, which provides methods for interacting with theOpenAIModels API. - moderations
- This module defines the
ModerationsAPI client, which provides methods for interacting with theOpenAIModeration API. - orphan
- Orphan namespace of the module.
- output
- Structures related to output items generated by the model, such as messages, tool calls, and annotations.
- own
- Own namespace of the module.
- performance_
cache - High-Performance Caching System
- performance_
monitoring - Performance Monitoring Module
- platform_
specific - Platform-specific features and integrations.
- prelude
- Prelude to use essentials:
use my_module ::prelude :: *. - query
- Defines common query parameters used for listing resources (pagination, sorting).
- realtime
- This module defines the
RealtimeAPI client, which provides methods for interacting with theOpenAIRealtime API. - realtime_
shared - Structures shared across the Realtime API for session management and event handling.
- request_
batching - Intelligent Request Batching System
- request_
cache - Request caching functionality for
OpenAIAPI client. - request_
cache_ enhanced - Enhanced Request Caching
- request_
templates - Request Templates for Common Use Cases
- request_
validation - Validate trait implementations for
OpenAIrequest types - response_
cache - Response Cache Module
- responses
- This module defines the
ResponsesAPI client, which provides methods for interacting with theOpenAIResponses API. - secret
- This module defines the
Secrettype for handling sensitive information like API keys. It wraps a string and ensures that the secret is not accidentally exposed in debug output or logs. - streaming_
control - Streaming Control Module
- streaming_
performance_ enhanced - Enhanced Streaming Performance Module
- sync
- Synchronous API wrapper for the
OpenAIclient. - tools
- This module defines various tool-related structures used across the
OpenAIAPI. - uploads
- Uploads Module
- usage_
shared - Structures related to API Usage and Costs endpoints.
- validators
- Validators module containing reusable validation functions
- vector_
stores - This module defines the
serde_json::ValuesAPI client, which provides methods for interacting with theOpenAIVector Stores API. - vector_
stores_ shared - Structures related to Vector Stores, including files, batches, and search results.
- websocket_
reliability_ enhanced - Enhanced WebSocket Reliability Module
- websocket_
streaming - WebSocket Streaming Module
Structs§
- Access
Pattern - Access pattern analysis for adaptive behavior
- Admin
- Administrative API client
- Advanced
Auth Config - Advanced authentication configuration
- Advanced
Auth Manager - Advanced authentication manager
- ApiConnector
Config - Configuration for third-party API connectors.
- ApiError
- Represents an error returned by the
OpenAIAPI. Corresponds to theErrorschema in theOpenAPIspec. - ApiError
Wrap - A wrapper for
ApiErrorthat includes the HTTP status code. - Assistants
- The client for the
OpenAIAssistants API. - Audio
- The client for the
OpenAIAudio API. - Auth
Audit Entry - Authentication audit log entry
- Auth
Performance Metrics - Authentication performance metrics
- Auth
Session - Authentication session information
- Auto
Scaling Config - Auto-scaling configuration
- Batch
Config - Configuration for request batching behavior
- Batch
JobConfig - Configuration for batch job creation
- Batch
Metrics - Batching performance metrics
- Batch
Optimizer - Batch processing optimization strategies
- Batch
Processing Metrics - Metrics for batch processing performance
- Batch
Recommended - Recommended configuration values for enhanced batch operations following “Thin Client, Rich API” principles.
- Batch
Result - Batch processing result
- Batch
Retry Config - Configuration for batch request retry behavior
- Batched
Request - Batched request container
- Batching
Analysis - Embedding batching analysis results Embedding batching analysis results Analysis of batching potential
- Browsing
Metadata - Metadata about browsing operation.
- Browsing
Result - Result of web browsing operation.
- Buffer
Config - Configuration for buffered streaming
- Buffered
Message - Buffered message for reliable delivery
- Buffered
Stream - Buffered stream wrapper
- Cache
Config - Cache configuration with performance optimizations
- Cache
Config - Configuration for request caching behavior.
- Cache
Config - Configuration for response caching behavior
- Cache
Entry - A cache entry containing the cached value with metadata.
- Cache
Entry - Cached response entry with metadata
- Cache
Key - Cache key with smart hashing for optimal performance
- Cache
Key - Cache key generation and management
- Cache
Metrics - Cache performance metrics
- Cache
Metrics - Cache performance metrics
- Cache
Statistics - Statistics for cache performance monitoring.
- Cache
Statistics - Cache statistics for monitoring and analysis
- Cached
Client - Cache-aware HTTP client wrapper
- Cached
Response - Cached response with metadata
- Cancellation
Token - Cancellation token for controlling streaming operations
- Chat
- The client for the
OpenAIChat API. - Checkpoint
Config - Checkpointing configuration
- Circuit
Breaker Metrics - Circuit breaker metrics
- Circuit
Breaker State Manager - Circuit breaker state management
- Client
- The main client for interacting with the
OpenAIAPI. - Code
Execution Config - Configuration for code execution environment.
- Code
Execution Result - Result of code execution.
- Comparison
Results - Results from comparing multiple models
- Compressed
Event - Compressed event for efficient storage and transmission
- Config
Change Event - Configuration change event
- Config
Change Receiver - Receiver for configuration change events
- Config
Change Sender - Sender for configuration change events
- Config
Manager - Configuration manager for stateless configuration operations
- Config
Snapshot - Configuration snapshot representing a point-in-time configuration state
- Config
Validator - Configuration validator
- Connection
Config - Configuration for advanced connection management
- Connection
Efficiency Metrics - Overall connection efficiency metrics
- Connection
Guard - RAII guard for connection pool connections
- Connection
Manager - Global connection manager
- Connection
Metrics - Connection performance metrics
- Connection
Performance Report - Connection performance metrics for monitoring
- Connection
Pool Stats - Connection pool statistics
- Connection
Stats - Connection usage statistics
- Create
Project Request - Request to create a new project
- Curl
Connection Options - Connection and security options for cURL commands
- Curl
Format Options - Options for formatting cURL commands
- Curl
Formatting Options - Formatting-related options for cURL commands
- Curl
Generator - Main cURL generation utility
- Curl
Request - Represents a cURL request with all necessary information
- Curl
Request Builder - Builder for constructing cURL requests
- Delete
File Response - Response when deleting a file
- Delete
Response - Generic delete response
- Deployment
Config - Model deployment configuration
- Deployment
Event - Deployment event for history tracking
- Deployment
Event Receiver - Receiver for deployment events
- Deployment
Event Sender - Sender for deployment events
- Deployment
Manager - Deployment manager for orchestrating model deployments
- Deployment
Manager Config - Configuration for deployment manager
- Deployment
Stats - Deployment statistics
- Diagnostics
Collection Config - Configuration for what data to collect
- Diagnostics
Collector - Main diagnostics collector
- Diagnostics
Config - Configuration for diagnostics collection behavior
- Diagnostics
Performance Config - Configuration for performance metrics
- Diagnostics
Report - Comprehensive diagnostics report
- Dynamic
Config Manager - Utilities for dynamic configuration management
- Embedding
Batch Processor - Smart embedding processing strategies
- Embeddings
- The client for the
OpenAIEmbeddings API. - Enhanced
Batch Request - Enhanced batch request with priority and retry configuration
- Enhanced
Cache Config - Advanced cache configuration with production-ready features
- Enhanced
Cache Entry - Enhanced cache entry with rich metadata
- Enhanced
Cache Statistics - Enhanced cache statistics with detailed metrics
- Enhanced
Circuit Breaker - Enhanced circuit breaker executor
- Enhanced
Circuit Breaker Config - Enhanced circuit breaker configuration
- Enhanced
Client - Enhanced
OpenAIclient with comprehensive reliability features - Enhanced
Client Builder - Builder for enhanced client configuration
- Enhanced
Embeddings - Enhanced embeddings client with intelligent batching
- Enhanced
Embeddings Config - Configuration for enhanced embeddings
- Enhanced
Rate Limiter - Enhanced rate limiter executor
- Enhanced
Rate Limiting Config - Enhanced rate limiting configuration
- Enhanced
Request Cache - Enhanced request cache with advanced features
- Enhanced
Retry Config - Enhanced retry configuration for HTTP requests
- Enhanced
Retry Executor - Enhanced retry executor with comprehensive retry logic
- Error
Metrics - Metrics for tracking errors
- Error
Metrics - Error tracking metrics
- Event
Batch - Buffered event batch for efficient processing
- Failover
Config - Failover configuration and policy
- Failover
Context - Failover context representing the current state of a failover attempt
- Failover
Endpoint - Endpoint configuration for failover
- Failover
Event Receiver - Receiver for failover events
- Failover
Event Sender - Sender for failover events
- Failover
Executor - Failover execution utilities
- Failover
Manager - Failover manager for endpoint selection and health tracking
- File
Object - File object returned by the
OpenAIFiles API - Files
- The client for the
OpenAIFiles API. - Fine
Tuning - The client for the
OpenAIFine-tuning API. - Grounded
Response - Response from search grounding operation.
- Health
Check Config - Configuration for health checks
- Health
Check Config - Health check configuration for deployments
- Health
Check Result - Health check result for a single endpoint
- Health
Checker - Stateless health check utilities
- Host
Connection Pool - Connection pool manager for a specific host
- Hyper
Parameters - Training hyperparameters
- Image
Generation Config - Configuration for image generation operations.
- Image
Metadata - Metadata about generated image.
- Image
Result - Result of image generation/manipulation.
- Images
- The client for the
OpenAIImages API. - Invite
- Invite entity for user invitations
- List
Files Response - List files response
- List
Response - List response wrapper
- Managed
Connection - Enhanced HTTP client with advanced connection management
- Memory
Usage Report - Memory usage report structure
- Metrics
Aggregation - Metrics aggregation statistics
- Metrics
Analysis Report - Comprehensive metrics analysis report
- Metrics
Collector - Central metrics collector and analyzer
- Metrics
Config - Configuration for metrics collection behavior
- Metrics
Data Point - Time-series data point for metrics
- Metrics
Snapshot - Comprehensive metrics snapshot
- Model
Checkpoint - Model checkpoint information
- Model
Comparator - Model comparator for A/B testing
- Model
Comparison Result - Result from comparing a single model
- Model
Deployment - Model deployment instance
- Model
Deployment Utils - Model deployment utilities
- Model
Tuning Utils - Model tuning utilities
- Models
- The client for the
OpenAIModels API. - Moderations
- The client for the
OpenAIModeration API. - Multi
Tenant Config - Multi-tenant authentication configuration
- OAuth
Token Response - OAuth token response from authentication server
- OpenAI
Recommended - Recommended configuration values for
OpenAIAPI client following “Thin Client, Rich API” principles. - Openai
Environment Impl - Concrete implementation of
OpenaiEnvironment. - Organization
- Organization entity
- Organization
Settings - Organization settings
- Organization
Update - Request to update organization
- Parameter
Definition - Definition of a single parameter.
- Performance
Analysis - Analysis of connection performance
- Performance
Cache - High-performance cache implementation
- Performance
Config - Performance monitoring configuration
- Performance
Metrics - Aggregated performance metrics
- Performance
Monitor - Performance monitoring context
- Pool
Statistics - Statistics for a connection pool
- Processing
Stats - Processing statistics
- Project
- Project entity
- Project
Update - Request to update project
- Rate
Limit Config - Rate limiting configuration.
- Realtime
- The client for the
OpenAIRealtime API. - Regression
Report - Performance regression detection report
- Reliable
WebSocket Session - Enhanced WebSocket session with reliability features
- Request
Batcher - Intelligent request batcher
- Request
Cache - Thread-safe request cache with TTL and LRU eviction.
- Request
Cache Key - Key used for caching requests based on endpoint, method, and content.
- Request
Cache Key - Re-export
RequestCacheKeyfrom original implementation - Request
Metrics - Metrics for a single request
- Request
Response Metrics - Combined request/response metrics
- Request
Signature - Request signature for batching similarity detection
- Request
Template - Request template for common use cases
- Resource
Requirements - Resource requirements for deployment
- Response
Cache - Advanced response cache with TTL and intelligent management
- Response
Metrics - Metrics for a single response
- Responses
- The client for the
OpenAIResponses API. - Retry
Config - Retry configuration.
- Retry
State - Thread-safe retry state management
- Search
Grounding Config - Configuration for search grounding operations.
- Search
Metadata - Metadata about search operation.
- Search
Source - Individual search result source.
- Secret
- Represents a secret string, such as an API key.
It wraps
secrecy::SecretStringto prevent accidental exposure. - Sliding
Window State - Sliding window rate limiter state
- Stream
Config - Configuration for synchronous streaming operations.
- Stream
Control - Stream control handle for managing streaming operations
- Stream
Control Config - Configuration for streaming control behavior
- Stream
Control Manager - Stream control utilities
- Stream
Control Receiver - Receiver for stream control commands
- Stream
Control Sender - Sender for stream control commands
- Streaming
Buffer - Enhanced streaming buffer with performance optimizations
- Streaming
Connection Pool - Connection pool for streaming endpoints
- Streaming
Performance Config - Configuration for streaming performance optimizations
- Streaming
Performance Stats - Statistics for streaming performance monitoring
- Streaming
Processor - Enhanced streaming processor with performance optimizations
- Sync
Chat - Synchronous wrapper for the chat API.
- Sync
Client - Synchronous wrapper around the async
OpenAIclient. - Sync
Embeddings - Synchronous wrapper for the embeddings API.
- Sync
Models - Synchronous wrapper for the models API.
- Sync
Stream Iterator - Synchronous iterator that bridges async receivers to sync iteration.
- Throughput
Metrics - Throughput metrics under load
- Timing
Metrics - Request timing metrics
- Token
Bucket State - Token bucket rate limiter state
- Tool
Parameters - Tool parameter definitions.
- Tool
Result - Result of tool execution.
- Training
Data Config - Training data configuration
- Training
Metrics - Training progress metrics
- Tuning
Event - Tuning event for logging
- Tuning
Event Receiver - Tuning event receiver
- Tuning
Event Sender - Tuning event sender
- Tuning
Job - Model tuning job instance
- Tuning
JobConfig - Model tuning job configuration
- Tuning
Manager - Model tuning manager
- Tuning
Notification - Tuning event notification
- Tuning
Resource Requirements - Resource requirements for training
- Tuning
Stats - Tuning statistics
- Unified
Performance Dashboard - Unified performance dashboard combining all components
- Upload
Config - File upload configuration
- Uploads
- Uploads API implementation
- Usage
Limits - Usage limits for organization
- User
- User entity within organization
- Validation
Error - Validation error containing detailed information about what failed
- Vector
Stores - The client for the
OpenAIVector Stores API. - WebBrowsing
Config - Configuration for web browsing operations.
- WebSocket
Config - WebSocket connection configuration
- WebSocket
Connection - WebSocket connection handle
- WebSocket
Connection Stats - WebSocket connection statistics for reliability monitoring
- WebSocket
Connection Stats - WebSocket connection statistics
- WebSocket
Event Receiver - Receiver for WebSocket events
- WebSocket
Event Sender - Sender for WebSocket events
- WebSocket
Message Receiver - Receiver for WebSocket messages
- WebSocket
Message Sender - Sender for WebSocket messages
- WebSocket
Pool - WebSocket connection pool for managing multiple connections
- WebSocket
Pool Config - Configuration for WebSocket connection pool
- WebSocket
Reliability Config - Configuration for WebSocket reliability features
- WebSocket
Streamer - WebSocket streaming utilities
- WsSession
- A WebSocket session client for the
OpenAIRealtime API.
Enums§
- ApiAuthentication
- Authentication methods for third-party APIs.
- Batch
Request Priority - Priority levels for batch request processing
- Cache
Priority - Cache entry priority levels
- Circuit
Breaker State - Circuit breaker state enumeration
- Code
Runtime - Available code runtime environments.
- Comparison
Mode - Comparison mode for model testing
- Config
Value - Configuration value that can be dynamically updated
- Connection
Health - Connection health status
- Connection
State - Connection state for reliability tracking
- Deployment
Event Type - Types of deployment events
- Deployment
Notification - Deployment notification types
- Deployment
Status - Model deployment status
- Deployment
Strategy - Deployment strategy type
- Endpoint
Health - Endpoint health status
- Eviction
Policy - Cache eviction policies
- Failover
Error - Failover error types
- Failover
Event - Failover event types
- Failover
Strategy - Failover strategy for selecting endpoints
- File
Status - Status of a file in the
OpenAIsystem - Fine
Tuning Method - Parameter-efficient fine-tuning method
- Handler
Message - Represents a message handled by the WebSocket session.
- Health
Check Strategy - Health check strategy
- Health
Status - Health status for an endpoint
- Image
Model - Available image generation models.
- Image
Quality - Image quality options.
- Image
Response Format - Image response format.
- Image
Size - Image size options.
- Image
Style - Image style options.
- Invite
Status - Invite status enumeration
- OpenAI
Error - Represents all possible errors that can occur when interacting with the
OpenAIAPI. - Project
Status - Project status enumeration
- Rate
Limiting Algorithm - Rate limiting algorithm enumeration
- Response
Request Validation Error - Validation errors for
CreateResponseRequestbuilders - Search
Engine - Available search engines for grounding.
- Security
Level - Security levels for code execution.
- Stream
Control Command - Commands for controlling stream operations
- Stream
State - Stream control state for tracking operations
- Training
Objective - Training objective type
- Tuning
Event Type - Types of tuning events
- Tuning
Status - Fine-tuning job status
- User
Role - User roles within organization
- Validation
Rule - Configuration validation rule
- WebSocket
Event - WebSocket event types
- WebSocket
Message - WebSocket message type
- WebSocket
State - WebSocket connection state
Constants§
- OPENAI_
BETA_ HEADER OpenAIBeta header for API requests.
Traits§
- ApiConnector
- Trait for third-party API connectors.
- Client
ApiAccessors - Extension trait providing API accessor methods for Client
- Create
Response Request Enhancements - Enhanced builder methods for
CreateResponseRequest - Curl
Generation - Trait for API clients to support cURL generation
- Custom
Tool - Trait for custom tools that can be integrated.
- Environment
Interface - A trait defining the interface for environment-related information.
- Function
Tool Enhancements - Enhanced builder methods for
FunctionTool - Input
Message Enhancements - Enhanced builder methods for
InputMessage - Openai
Environment - A trait defining the interface for
OpenAIenvironment configuration. - Platform
Specific Client - Extension trait for platform-specific client methods.
- Stream
Buffer Ext - Extension trait for streams to add buffering
- Validate
- Trait for validating request parameters before API calls
Functions§
- aggregate_
batch_ results - Aggregate and analyze batch results
- analyze_
embedding_ batching_ potential - Analyze batching potential for given requests (standalone function)
- analyze_
performance - Analyze connection performance and provide recommendations
- build_
curl_ request - Helper function to build a cURL request from HTTP request components
- cancel_
batch_ job - Cancel a batch job with enhanced cleanup
- configure_
performance_ monitoring - Set custom performance monitor configuration
- configure_
streaming_ processor - Configure the global streaming processor
- create_
batch_ job - Enhanced batch job creation with priority and retry configuration
- create_
failover_ client - Convenience function : Create failover client using global manager
- create_
oauth_ client - Convenience function : Create OAuth client using global manager
- create_
reliable_ session - Create a reliable WebSocket session with global configuration
- create_
reliable_ session_ with_ config - Create a reliable WebSocket session with custom configuration
- create_
tenant_ client - Convenience function : Create tenant client using global manager
- detect_
performance_ regression - Detect performance regression using global monitor
- flush_
events - Flush buffered events from the global processor
- get_
advanced_ auth_ manager - Get reference to global advanced authentication manager
- get_
batch_ status - Get enhanced batch status with progress tracking
- get_
buffer_ stats - Get buffer statistics from the global processor
- get_
connection_ stats - Get connection statistics from the global processor
- get_
global_ config - Get the global WebSocket reliability configuration
- get_
performance_ monitor - Get the global performance monitor instance
- get_
streaming_ processor - Get the global streaming processor instance
- initialize_
advanced_ auth - Initialize global advanced authentication manager
- list_
batch_ jobs - List batch jobs with enhanced filtering and pagination
- map_
deserialization_ error - Helper function to map
serde_json::ErrortoOpenAIError::Internal. - measure_
concurrent_ performance - Measure concurrent performance using global monitor
- measure_
overhead_ consistency - Measure overhead consistency using global monitor
- measure_
request_ overhead - Convenience functions for global performance monitoring
- measure_
throughput_ under_ load - Measure throughput under load using global monitor
- monitor_
batch_ with_ webhooks - Monitor batch progress with webhook notifications
- monitor_
memory_ usage - Monitor memory usage using global monitor
- optimize_
and_ chunk_ batch - Optimize and chunk batch requests for better performance
- optimize_
batch_ performance - Optimize batch performance with advanced algorithms
- process_
batch - Process multiple events using the global processor
- process_
batch_ with_ caching - Process batch with intelligent caching and deduplication
- process_
concurrent_ batches - Process multiple batches concurrently with rate limiting
- process_
enhanced_ batch - Process enhanced batch with priority handling and advanced features
- process_
event - Convenience functions for global streaming processing
- retry_
failed_ batch - Retry failed batch with enhanced error recovery
- role_
level - Get role hierarchy level for comparison
- serialize_
request_ to_ json - Helper function to serialize a request to JSON
- set_
global_ config - Set the global WebSocket reliability configuration
- validate_
permission - Check if a user has sufficient permissions for an operation
Type Aliases§
- ApiRequest
Cache - Cache implementation specifically for API requests and responses.
- Enhanced
ApiRequest Cache - Type alias for enhanced API request cache
- Result
- Type alias for Results using
error_toolspattern