diff options
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