reflex-cache 0.2.2

Episodic memory and high-speed semantic cache for LLM responses
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::sync::Arc;

use super::cloud::{CloudOps, GcpCloudOps, LocalCloudOps};
use super::config::{CloudProviderType, LifecycleConfig};

/// Builds the appropriate [`CloudOps`] implementation for the config.
pub async fn build_cloud_ops(config: &LifecycleConfig) -> Arc<dyn CloudOps> {
    match config.cloud_provider {
        CloudProviderType::Gcp => Arc::new(GcpCloudOps::new()),
        CloudProviderType::Local => Arc::new(LocalCloudOps::new()),
    }
}