1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! # neuromance-common
//!
//! Common types and data structures for LLM conversation and tool management.
//!
//! This crate provides the foundational types for building LLM-powered applications:
//! - Conversation and message management
//! - Tool/function calling support
//! - Serializable data structures for persistence and API communication
//!
//! ## Example
//!
//! ```
//! use neuromance_common::{Conversation, Message, ToolCall, Tool, Function};
//! use uuid::Uuid;
//!
//! // Create a new conversation
//! let conv = Conversation::new()
//! .with_title("Time Assistant")
//! .with_description("Helping users get the current time");
//!
//! // Add a user message
//! let msg = Message::user(conv.id, "What time is it?");
//!
//! // Define a tool
//! let tool = Tool {
//! r#type: "function".to_string(),
//! function: Function {
//! name: "get_current_time".to_string(),
//! description: "Get the current date and time in UTC format. Takes no parameters.".to_string(),
//! parameters: serde_json::json!({
//! "type": "object",
//! "properties": {},
//! "required": [],
//! }),
//! },
//! };
//!
//! // Create a tool call
//! let tool_call = ToolCall::new("get_current_time", Vec::<String>::new());
//! ```
pub use ;
pub use ;