diff --git a/Cargo.toml b/Cargo.toml index df84b92..0f97455 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ thiserror = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" stp-core = { git = "https://git.methanium.net/shoal/stp.git" } +tokio = "1" [dev-dependencies] tokio = { version = "1", features = ["full"] } diff --git a/src/ai_response.rs b/src/ai_response.rs new file mode 100644 index 0000000..a3774fd --- /dev/null +++ b/src/ai_response.rs @@ -0,0 +1,21 @@ +use std::sync::Arc; + +use serde::{Deserialize, Serialize}; +use tokio::sync::RwLock; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Message { + pub user: bool, + pub content: String, +} + +pub type Conversation = Arc>; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AiConversation { + pub model: String, + pub messages: Vec, + pub max_tokens: u32, + pub temperature: f32, + pub stream: bool, +} diff --git a/src/lib.rs b/src/lib.rs index a96af27..f9c4eda 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,6 +2,7 @@ pub use chrono::{DateTime, Utc}; pub use stp_core::{CommunicationType, CommunicationValue, DataTypes, DataValue}; pub use uuid::Uuid; +pub mod ai_response; pub mod coral; pub mod enums; pub mod errors; @@ -10,6 +11,7 @@ pub mod project; pub mod task; pub mod todo; +pub use ai_response::{Conversation, Message}; pub use coral::{Coral, CoralId}; pub use enums::*; pub use errors::{ShoalError, ValidationError};