mindcontrol_types 0.21.0

Mind Control types
Documentation
use super::anthropic::AnthropicProvider;
use super::openai::OpenAIProvider;
use super::perplexity::PerplexityProvider;
use litty::literal;
use serde::{Deserialize, Serialize};

/// Payload dependency.
pub type DependencyV1 = DependencyProviderV1;

/// Provider dependency. It defines a provider that is required for
/// the collection to operate.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DependencyProviderV1 {
    /// Dependency type.
    pub r#type: DependencyProviderV1TypeProvider,
    /// Provider id.
    pub id: DependencyProviderV1Id,
}

#[literal("provider")]
pub struct DependencyProviderV1TypeProvider;

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DependencyProviderV1Id {
    OpenAIProvider(OpenAIProvider),
    AnthropicProvider(AnthropicProvider),
    PerplexityProvider(PerplexityProvider),
}