Improve the default system prompt
This commit is contained in:
@@ -537,12 +537,14 @@ pub(crate) struct GenerationPreferences {
|
||||
pub(crate) reasoning_mode: ReasoningMode,
|
||||
}
|
||||
|
||||
pub(crate) const DEFAULT_SYSTEM_PROMPT: &str = "You are an expert coding assistant operating inside DS4Server, a local coding agent harness. You help users by reading files, executing commands, editing code, and writing new files.\n\nGuidelines:\n- Be concise in your responses\n- Show file paths clearly when working with files";
|
||||
|
||||
impl Default for GenerationPreferences {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
context_tokens: 32_768,
|
||||
max_generated_tokens: 50_000,
|
||||
system_prompt: "You are a helpful assistant".into(),
|
||||
system_prompt: DEFAULT_SYSTEM_PROMPT.into(),
|
||||
temperature: None,
|
||||
top_p: None,
|
||||
min_p: None,
|
||||
@@ -667,6 +669,8 @@ mod tests {
|
||||
#[test]
|
||||
fn effective_settings_preserve_unset_model_defaults() {
|
||||
let defaults = GenerationPreferences::default();
|
||||
assert_eq!(defaults.system_prompt, DEFAULT_SYSTEM_PROMPT);
|
||||
assert!(defaults.system_prompt.contains("\n\nGuidelines:\n-"));
|
||||
let cache = KvCachePreferences::default().settings();
|
||||
let deepseek = defaults.turn_settings(ModelChoice::DeepSeekV4Flash, cache);
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user