use super::prompt::PromptV1;
use super::var::VarV1;
use super::signature::SignatureV1;
use super::llm::LlmSettingsV1;
use super::fragment::FragmentV1;
use serde::{Deserialize, Serialize};
use litty::literal;
use genotype_runtime::Any;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ResourceV1 {
ResourcePromptV1(ResourcePromptV1),
ResourceChainV1(ResourceChainV1),
ResourceDataV1(ResourceDataV1),
ResourceSettingsV1(ResourceSettingsV1),
ResourceFragmentsV1(ResourceFragmentsV1),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourceChainV1 {
pub r#type: ResourceChainV1TypeChain,
pub var: VarV1,
pub signature: SignatureV1,
pub chain: Vec<PromptV1>,
pub system: Option<String>,
pub settings: Option<LlmSettingsV1>,
}
#[literal("chain")]
pub struct ResourceChainV1TypeChain;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourceDataV1 {
pub r#type: ResourceDataV1TypeData,
pub var: VarV1,
pub data: Any,
}
#[literal("data")]
pub struct ResourceDataV1TypeData;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourcePromptV1 {
pub r#type: ResourcePromptV1TypePrompt,
pub var: VarV1,
pub signature: SignatureV1,
pub prompt: PromptV1,
}
#[literal("prompt")]
pub struct ResourcePromptV1TypePrompt;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourceSettingsV1 {
pub r#type: ResourceSettingsV1TypeSettings,
pub var: VarV1,
pub settings: LlmSettingsV1,
}
#[literal("settings")]
pub struct ResourceSettingsV1TypeSettings;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourceFragmentsV1 {
pub r#type: ResourceFragmentsV1TypeFragments,
pub var: VarV1,
pub fragments: Vec<FragmentV1>,
}
#[literal("fragments")]
pub struct ResourceFragmentsV1TypeFragments;