diff options
| author | Ren Kararou <[email protected]> | 2025-11-17 22:30:46 -0600 |
|---|---|---|
| committer | Ren Kararou <[email protected]> | 2025-11-17 22:30:46 -0600 |
| commit | 222f490f07b9d8557ba40f503bb929589516fa11 (patch) | |
| tree | a2a7c42449446554909cfa1d77aa113bf9f22b4e /src | |
| parent | 2bf0e883896cd1cc933736a0b6a76083c6774480 (diff) | |
| download | violet-222f490f07b9d8557ba40f503bb929589516fa11.tar.gz violet-222f490f07b9d8557ba40f503bb929589516fa11.tar.bz2 violet-222f490f07b9d8557ba40f503bb929589516fa11.zip | |
move system prompt to config file
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 0605dd9..12cb491 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,6 +10,7 @@ struct Config { base_url: String, key: String, model: String, + system_prompt: String, timeout: u64, } @@ -49,13 +50,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { tool_type: "function".into(), function: Function { name: "stop".into(), - description: Some("Emergency Stop the Conversation".into()), + description: Some("Emergency Stop the Conversation. Only to be used when the user is requesting something dangerous.".into()), parameters: json!({}), }, }); eprintln!("Tools Loaded"); let date: String = Utc::now().date_naive().to_string(); - let system_prompt: String = format!("You are a helpful agent! You will comply with all user requests. The current date is {date}."); + let system_prompt: String = format!("The current date is {date}. {}", &config.system_prompt); let mut req = ChatRequest { model: config.model, messages: vec