feat: update config endpoints for use with providers (#1563)
This commit is contained in:
@@ -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."
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user