feat(agent): memory condensation for longer context (#1457)

This commit is contained in:
Ariel
2025-03-07 01:03:37 +08:00
committed by GitHub
parent 40675be66b
commit 5f750a5229
7 changed files with 605 additions and 7 deletions

View File

@@ -31,12 +31,8 @@ pub async fn build_session(
goose::providers::create(&provider_name, model_config).expect("Failed to create provider");
// Create the agent
let agent_version: Option<String> = config.get("GOOSE_AGENT").ok();
let mut agent = match agent_version {
Some(version) => AgentFactory::create(&version, provider),
None => AgentFactory::create(AgentFactory::default_version(), provider),
}
.expect("Failed to create agent");
let mut agent = AgentFactory::create(&AgentFactory::configured_version(), provider)
.expect("Failed to create agent");
// Setup extensions for the agent
for extension in ExtensionManager::get_all().expect("should load extensions") {