#![allow(dead_code)]
use serde::{Deserialize, Serialize};
mod controller;
mod events;
mod participant;
pub use controller::{DialogueController, TurnMode};
pub use events::StopReason;
#[allow(unused_imports)]
pub use controller::DialogueState;
#[allow(unused_imports)]
pub use events::DialogueEvent;
pub use participant::{DialogueParticipant, ParticipantColor, ParticipantId, ParticipantParams};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize)]
pub enum DialogueMode {
Collaboration,
Debate,
Critique,
#[default]
FreeForm,
Custom,
}
impl DialogueMode {
#[must_use]
pub const fn display_name(&self) -> &'static str {
match self {
Self::Collaboration => "Collaboration",
Self::Debate => "Debate",
Self::Critique => "Critique",
Self::FreeForm => "Free",
Self::Custom => "Custom",
}
}
#[must_use]
pub const fn description(&self) -> &'static str {
match self {
Self::Collaboration => "LLMs work together toward a common goal",
Self::Debate => "LLMs defend opposing positions",
Self::Critique => "One generates, others critique and improve",
Self::FreeForm => "Open conversation without constraints",
Self::Custom => "User-defined behavior via system prompts",
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DialogueConfig {
pub mode: DialogueMode,
pub initial_prompt: String,
pub turn_mode: TurnMode,
}
impl Default for DialogueConfig {
fn default() -> Self {
Self {
mode: DialogueMode::FreeForm,
initial_prompt: String::new(),
turn_mode: TurnMode::RoundRobin,
}
}
}