Refactor system prompts to eliminate duplication; upgrade embedded provider

- Refactor prompts.rs: extract shared sections (intro, TODO, workspace memory,
  web research, response guidelines) used by both native and non-native prompts
- Fix typo in native prompt: "save them.." -> "save them."
- Fix non-native prompt: add missing closing braces in JSON examples,
  add IMPORTANT steps section, align with native prompt quality
- Add 9 unit tests to verify both prompts contain required sections
- Upgrade llama-cpp-2 dependency and refactor embedded provider
- Update config.example.toml with embedded model examples
- Update workspace memory
This commit is contained in:
Dhanji R. Prasanna
2026-01-28 09:56:39 +11:00
parent 585684a86e
commit a902be1562
9 changed files with 1027 additions and 851 deletions

View File

@@ -78,7 +78,8 @@ fn register_embedded_providers(
) -> Result<()> {
for (name, embedded_config) in &config.providers.embedded {
if should_register(providers_to_register, "embedded", name) {
let embedded_provider = g3_providers::EmbeddedProvider::new(
let embedded_provider = g3_providers::EmbeddedProvider::new_with_name(
format!("embedded.{}", name),
embedded_config.model_path.clone(),
embedded_config.model_type.clone(),
embedded_config.context_length,