feat: update config endpoints for use with providers (#1563)

This commit is contained in:
Lily Delalande
2025-03-10 09:51:54 -07:00
committed by GitHub
parent 3b36591cb5
commit 5df2875c1c
43 changed files with 945 additions and 428 deletions
+1 -1
View File
@@ -351,7 +351,7 @@ impl Capabilities {
let mut system_prompt_extensions = self.system_prompt_extensions.clone();
let config = Config::global();
let goose_mode = config.get("GOOSE_MODE").unwrap_or("auto".to_string());
let goose_mode = config.get_param("GOOSE_MODE").unwrap_or("auto".to_string());
if goose_mode == "chat" {
system_prompt_extensions.push(
"Right now you are in the chat only mode, no access to any tool use and system."
+1 -1
View File
@@ -50,7 +50,7 @@ impl AgentFactory {
pub fn configured_version() -> String {
let config = Config::global();
config
.get::<String>("GOOSE_AGENT")
.get_param::<String>("GOOSE_AGENT")
.unwrap_or_else(|_| Self::default_version().to_string())
}
+1 -1
View File
@@ -177,7 +177,7 @@ impl Agent for SummarizeAgent {
// Load settings from config
let config = Config::global();
let goose_mode = config.get("GOOSE_MODE").unwrap_or("auto".to_string());
let goose_mode = config.get_param("GOOSE_MODE").unwrap_or("auto".to_string());
// we add in the 2 resource tools if any extensions support resources
// TODO: make sure there is no collision with another extension's tool name
+1 -1
View File
@@ -171,7 +171,7 @@ impl Agent for TruncateAgent {
// Load settings from config
let config = Config::global();
let goose_mode = config.get("GOOSE_MODE").unwrap_or("auto".to_string());
let goose_mode = config.get_param("GOOSE_MODE").unwrap_or("auto".to_string());
// we add in the 2 resource tools if any extensions support resources
// TODO: make sure there is no collision with another extension's tool name